Select active Spring profile based on Maven profile

build-war uses the Spring postgres profile, default is hsqldb and dev
This commit is contained in:
2019-03-16 22:52:13 +01:00
parent 57643f5b5b
commit 44af29c7a7
2 changed files with 6 additions and 3 deletions

View File

@@ -24,6 +24,7 @@
<maven.compiler.target>1.9</maven.compiler.target>
<java.version>1.9</java.version>
<packaging.type>jar</packaging.type>
<activeProfiles>hsqldb,dev</activeProfiles>
</properties>
<dependencies>
@@ -159,6 +160,7 @@
<id>build-war</id>
<properties>
<packaging.type>war</packaging.type>
<activeProfiles>postgres</activeProfiles>
</properties>
<build>
<finalName>financer##${project.version}</finalName>

View File

@@ -1,8 +1,9 @@
###
### This is the main configuration file of the application
###
### This is the main configuration file of the application.
### Filtering of the @...@ values happens via the maven-resource-plugin. The execution of the plugin is configured in
### the Spring Boot parent POM.
spring.profiles.active=hsqldb,dev
spring.profiles.active=@activeProfiles@
server.servlet.context-path=/financer