Skip to content

Commit cae4a56

Browse files
committed
Use Quarkus application framework - adapt README
1 parent d33f435 commit cae4a56

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

README.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,22 +36,25 @@ The `model` module is not represented as a hexagon because it is not defined by
3636

3737
# How to Run the Application
3838

39-
The easiest way to run the application is to start the `main` method of the `Launcher` class (you'll find it in the `boostrap` module) from your IDE.
39+
You can run the application in Quarkus dev mode with the following command:
4040

41-
You can use one of the following VM options to select a persistence mechanism:
41+
```shell
42+
mvn quarkus:dev
43+
```
44+
45+
You can use one of the following system properties to select a persistence mechanism:
4246

4347
* `-Dpersistence=inmemory` to select the in-memory persistence option (default)
4448
* `-Dpersistence=mysql` to select the MySQL option
4549

46-
If you selected the MySQL option, you will need a running MySQL database. The easiest way to start one is to use the following Docker command:
50+
For example, to run the application in MySQL mode, enter:
4751

4852
```shell
49-
docker run --name hexagon-mysql -d -p3306:3306 \
50-
-e MYSQL_DATABASE=shop -e MYSQL_ROOT_PASSWORD=test mysql:8.1
53+
mvn quarkus:dev -Dpersistence=mysql
5154
```
5255

53-
The connection parameters for the database are hardcoded in `RestEasyUndertowShopApplication.initMySqlAdapter()`. If you are using the Docker container as described above, you can leave the connection parameters as they are. Otherwise, you may need to adjust them.
54-
56+
In dev mode, Quarkus will automatically start a MySQL database using Docker,
57+
and it will automatically create all database tables.
5558

5659
# Example Curl Commands
5760

0 commit comments

Comments
 (0)