From 2c66d2df6e31d67beea49c9f0c8dc751bccdeeeb Mon Sep 17 00:00:00 2001 From: Sven Woltmann Date: Tue, 7 Nov 2023 13:20:21 +0100 Subject: [PATCH] Add application.properties with default connection parameters --- .../src/main/resources/application.properties | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/bootstrap/src/main/resources/application.properties b/bootstrap/src/main/resources/application.properties index 2d5e628..bdb9f17 100644 --- a/bootstrap/src/main/resources/application.properties +++ b/bootstrap/src/main/resources/application.properties @@ -1,3 +1,11 @@ -# No properties required for this demo application -# You would put database connection parameters here, for example. -# But in dev mode, Quarkus creates those auto-magically. +# Without this line, Quarkus would abort with the following error message: +# "Model classes are defined for the default persistence unit but configured datasource not found: +# the default EntityManagerFactory will not be created." +%prod.quarkus.datasource.jdbc.url=dummy +%prod.persistence=inmemory + +%mysql.quarkus.datasource.jdbc.url=jdbc:mysql://localhost:3306/shop +%mysql.quarkus.datasource.username=root +%mysql.quarkus.datasource.password=test +%mysql.quarkus.hibernate-orm.database.generation=update +%mysql.persistence=mysql