提交 e4ddfd75 编写于 作者: shuzheng5201314's avatar shuzheng5201314

配置动态资源

上级 d3795b45
...@@ -40,7 +40,44 @@ ...@@ -40,7 +40,44 @@
<type>jar</type> <type>jar</type>
</dependency> </dependency>
</dependencies> </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> <build>
<finalName>cms-web</finalName> <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> </build>
</project> </project>
env=${profile.env}
\ No newline at end of file
profile.env=dev
\ No newline at end of file
profile.env=prod
\ No newline at end of file
profile.env=test
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册