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:
2
pom.xml
2
pom.xml
@@ -24,6 +24,7 @@
|
|||||||
<maven.compiler.target>1.9</maven.compiler.target>
|
<maven.compiler.target>1.9</maven.compiler.target>
|
||||||
<java.version>1.9</java.version>
|
<java.version>1.9</java.version>
|
||||||
<packaging.type>jar</packaging.type>
|
<packaging.type>jar</packaging.type>
|
||||||
|
<activeProfiles>hsqldb,dev</activeProfiles>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
@@ -159,6 +160,7 @@
|
|||||||
<id>build-war</id>
|
<id>build-war</id>
|
||||||
<properties>
|
<properties>
|
||||||
<packaging.type>war</packaging.type>
|
<packaging.type>war</packaging.type>
|
||||||
|
<activeProfiles>postgres</activeProfiles>
|
||||||
</properties>
|
</properties>
|
||||||
<build>
|
<build>
|
||||||
<finalName>financer##${project.version}</finalName>
|
<finalName>financer##${project.version}</finalName>
|
||||||
|
|||||||
@@ -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
|
server.servlet.context-path=/financer
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user