配置动态资源
This commit is contained in:
parent
d3795b45cb
commit
e4ddfd75c1
|
@ -40,7 +40,44 @@
|
|||
<type>jar</type>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>dev</id>
|
||||
<properties>
|
||||
<env>dev</env>
|
||||
</properties>
|
||||
<activation>
|
||||
<activeByDefault>true</activeByDefault>
|
||||
</activation>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>test</id>
|
||||
<properties>
|
||||
<env>test</env>
|
||||
</properties>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>prod</id>
|
||||
<properties>
|
||||
<env>prod</env>
|
||||
</properties>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
<build>
|
||||
<finalName>cms-web</finalName>
|
||||
<filters>
|
||||
<filter>src/main/resources/profiles/${env}.properties</filter>
|
||||
</filters>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<excludes>
|
||||
<exclude>src/main/resources/profiles/*</exclude>
|
||||
</excludes>
|
||||
<filtering>true</filtering>
|
||||
</resource>
|
||||
</resources>
|
||||
</build>
|
||||
</project>
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
env=${profile.env}
|
|
@ -0,0 +1 @@
|
|||
profile.env=dev
|
|
@ -0,0 +1 @@
|
|||
profile.env=prod
|
|
@ -0,0 +1 @@
|
|||
profile.env=test
|
Loading…
Reference in New Issue