美文网首页
SpringCloud 多环境配置文件使用

SpringCloud 多环境配置文件使用

作者: 莫夏_b560 | 来源:发表于2020-10-30 16:34 被阅读0次

多个bootstrap.yml配置文件 bootstrap-dev.yml bootstrap-prod.yml bootstrap-local.yml 想使用local的配置 如果是IDEA启动也在页面配置Active profiles指定为local 如果是jar包命令启动java -jar 名称.jar --spring.profiles.active=test 如果是测试类启动需在启动类上增加注解@ActiveProfiles("local")

相关文章

网友评论

      本文标题:SpringCloud 多环境配置文件使用

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