JZTXT
  • 首页
  • Ai
  • Java
  • Python
  • Android
  • Mysql
  • JavaScript
  • Html
  • CSS

SpringBoot 多环境部署

发布时间 2023-05-31 15:00:08作者: vx_guanchaoguo0

多个配置文件

  • application.yaml
  • application-dev.yaml
  • application-test.yaml
  • application-prod.yaml

加载顺序

  • 默认加载 application.yaml
  • profiles.active ==dev 合配置

使用不同配置

  • application.yaml 中 profiles.active:dev
  • nohup java -Duser.timezone=Asia/Shanghai -jar -Dspring.profiles.active=prod app.jar > start1.log 2>&1 &
    本栏目推荐文章
  • 蚂蚁爱购--靠谱的SpringBoot项目
  • 实时数据流无忧:用 SpringBoot 和 SSE 打造动态前端更新的终极指南
  • springBoot(基础部分)
  • SpringBoot配置报错:Description: Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured. Reason: Failed to determine a suitable driver class
  • 40 个 SpringBoot 常用注解:让生产力爆表!
  • Springboot 全局日期时间格式处理
  • SpringBoot中使用SpringEvent业务解耦神器实现监听发布事件同步异步执行任务
  • SpringBoot3.x升级整合各依赖
  • Springboot 项目集成 PageOffice V6 最简单代码
  • SpringBoot中使用SpringRetry实现重试机制(重试调用第三方API)
版权声明:本网站为非赢利性站点,本网站所有内容均来源于互联网相关站点自动搜索采集信息,相关链接已经注明来源。
联系我们