Skip to content

Commit 4a892cb

Browse files
committed
Use Quarkus application framework - adapt README
1 parent 6d34661 commit 4a892cb

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,22 +51,25 @@ The `model` module is not represented as a hexagon because it is not defined by
5151

5252
# How to Run the Application
5353

54-
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.
54+
You can run the application in Quarkus dev mode with the following command:
55+
56+
```shell
57+
mvn test-compile quarkus:dev
58+
```
5559

5660
You can use one of the following VM options to select a persistence mechanism:
5761

5862
* `-Dpersistence=inmemory` to select the in-memory persistence option (default)
5963
* `-Dpersistence=mysql` to select the MySQL option
6064

61-
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:
65+
For example, to run the application in MySQL mode, enter:
6266

6367
```shell
64-
docker run --name hexagon-mysql -d -p3306:3306 \
65-
-e MYSQL_DATABASE=shop -e MYSQL_ROOT_PASSWORD=test mysql:8.1
68+
mvn test-compile quarkus:dev -Dpersistence=mysql
6669
```
6770

68-
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.
69-
71+
In dev mode, Quarkus will automatically start a MySQL database using Docker,
72+
and it will automatically create all database tables.
7073

7174
# Example Curl Commands
7275

0 commit comments

Comments
 (0)