From d7076428fd2d4983857a24fe424310ca4805587b Mon Sep 17 00:00:00 2001 From: Anton Micke Date: Mon, 17 Mar 2025 16:29:39 +0100 Subject: [PATCH] Add testing profile --- pom.xml | 20 +++++++++++++++++++ ...properties => application-prod.properties} | 0 .../resources/application-test.properties | 8 ++++++++ 3 files changed, 28 insertions(+) rename src/main/resources/{application.properties => application-prod.properties} (100%) create mode 100644 src/main/resources/application-test.properties diff --git a/pom.xml b/pom.xml index 9980fe2..aa8f279 100644 --- a/pom.xml +++ b/pom.xml @@ -20,6 +20,7 @@ 23 UTF-8 24.6.6 + test @@ -52,6 +53,11 @@ mariadb-java-client 3.5.2 + + com.h2database + h2 + runtime + org.springframework.boot spring-boot-starter-tomcat @@ -81,6 +87,11 @@ org.springframework.boot spring-boot-maven-plugin + + + ${spring.profiles.active} + + @@ -88,6 +99,9 @@ production + + prod + com.vaadin @@ -121,6 +135,12 @@ + + test + + test + + \ No newline at end of file diff --git a/src/main/resources/application.properties b/src/main/resources/application-prod.properties similarity index 100% rename from src/main/resources/application.properties rename to src/main/resources/application-prod.properties diff --git a/src/main/resources/application-test.properties b/src/main/resources/application-test.properties new file mode 100644 index 0000000..35ac1b0 --- /dev/null +++ b/src/main/resources/application-test.properties @@ -0,0 +1,8 @@ +server.port=${PORT:8080} +logging.level.org.atmosphere = warn +spring.mustache.check-template-location = false + +spring.datasource.url=jdbc:h2:mem:testdb +spring.datasource.username=sa +spring.datasource.password= +spring.jpa.hibernate.ddl-auto=create \ No newline at end of file