0
点赞
收藏
分享

微信扫一扫

记一次 springboot 应用在 k8s 上多环境配置文件不生效问题

若如初梘 2022-01-25 阅读 15
  1. springboot 版本为 2.6.3 配置 spring.profiles.active = dev 时,dev 的配置文件本地运行正常,但是在 k8s 上 dev 的配置文件并未加载
    解决方案: 在 dev 的配置文件上加上 spring.config.activate.on-profile = dev

原因 springboot 2.4 之后多环境配置上有调整
参考:https://zhuanlan.zhihu.com/p/363354421

举报

相关推荐

0 条评论