<profiles> <profile> <id>dev</id> <properties> <env>dev</env> </properties> <!--未指定环境时,默认打包dev环境--> <activation> <activeByDefault>true</activeByDefault> </activation> </profile> <profile> <id>test</id> <properties> <env>test</env> </properties> </profile> <profile> <id>product</id> <properties> <env>product</env> </properties> </profile> </profiles>
<!--对于项目资源文件的配置放在build中--> <resources> <resource> <directory>src/main/resources/${env}</directory> </resource> <resource> <directory>src/main/java</directory> <includes> <include>**/*.xml</include> <include>**/*.properties</include> <include>**/*.tld</include> </includes> <filtering>false</filtering> </resource> </resources>
总结
本篇文章就到这里了,希望能够给你带来帮助,也希望您能够多多关注服务器之家的更多内容!
原文链接:https://blog.csdn.net/weixin_43118073/article/details/120163585