美文网首页
springBoot多环境配置

springBoot多环境配置

作者: 咖啡机an | 来源:发表于2018-07-03 18:07 被阅读0次

很多场景的配置,比如数据库配置。在不同的环境,我们需要不同的包去运行项目。所以看项目结构,有两个环境配置:
1.application-dev.properties 开发环境
2.application-prod.properties 生产环境
Spring Boot 是通过 application.properties 文件中,设置 spring.profiles.active 属性选择加载配置

1.png

相关文章

网友评论

      本文标题:springBoot多环境配置

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