竞争无处不在,青春永不言败!专业撸代码,副业修bug

Talk is cheap , show me the code!



springboot 分离环境部署

application.yml 配合 pom.xml

spring:
profiles:
active: @spring.profiles.active@

pom.xml 文件

src/main/resources true org.apache.maven.plugins maven-resources-plugin 2.7 @ false prod prod true dev dev
    </profile>
    <profile>
        <!-- 测试环境 -->
        <id>test</id>
        <properties>
            <spring.profiles.active>test</spring.profiles.active>
        </properties>
    </profile>
</profiles>

分环境打包
mvn clean package -Pprod -Dmaven.test.skip=true

mvn clean package -Pdev -Dmaven.test.skip=true

posted @ 2021-04-06 17:02  云雾散人  阅读(70)  评论(0编辑  收藏  举报

Your attitude not your aptitude will determine your altitude!

如果有来生,一个人去远行,看不同的风景,感受生命的活力!