Add property 'db.name' to enable config of DB connection during build time

This commit is contained in:
2019-06-20 16:13:45 +02:00
parent d29bb0570a
commit 03846e4a19
2 changed files with 8 additions and 4 deletions

View File

@@ -19,6 +19,7 @@
<properties>
<packaging.type>jar</packaging.type>
<activeProfiles>hsqldb,dev</activeProfiles>
<db.name>financer</db.name>
</properties>
<dependencies>

View File

@@ -1,8 +1,11 @@
spring.flyway.locations=classpath:/database/postgres,classpath:/database/common
spring.datasource.url=jdbc:postgresql://localhost/financer
spring.datasource.username=financer
spring.datasource.password=financer
# Placeholder @db.name@ maps to the property db.name in the server POM.
# Its default value is 'financer'
# Enables easy configuration of DB name/user to use at build time
spring.datasource.url=jdbc:postgresql://localhost/@db.name@
spring.datasource.username=@db.name@
spring.datasource.password=@db.name@
# See https://github.com/spring-projects/spring-boot/issues/12007
spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true