美文网首页
SpringBoot profile设置不同环境

SpringBoot profile设置不同环境

作者: Fintecher | 来源:发表于2019-03-22 16:10 被阅读0次

开发程序需要发布不同环境的程序,比如测试环境,staging, product...

那么我们的配置在每一个环境下可能就不同了。
application-dev.yml配置开发版本的环境
application-prod.yml配置生成版本的环境

application.yml中注明使用哪一个环境就可以了

spring:
  profiles:
    active: dev

上面激活开发环境的配置

相关文章

网友评论

      本文标题:SpringBoot profile设置不同环境

      本文链接:https://www.haomeiwen.com/subject/hxdrvqtx.html