@profileActive@ 是配合 maven profile 进行选择不同配置文件进行开发 application.properties 中配置
1 |
spring.profiles.active=@profileActive@ |
pom 中配置
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
<profiles> <profile> <id>dev</id> <properties> <profileActive>dev</profileActive> </properties> <activation> <activeByDefault>true</activeByDefault> </activation> </profile> <profile> <id>prod</id> <properties> <profileActive>prod</profileActive> </properties> </profile> </profiles> |
打包命令
1 2 |
mvn package -P dev -DskipTests mvn package -P prod -DskipTests |
from:https://blog.csdn.net/thebigdipperbdx/article/details/106761805
View Details