Spring Boot中如何实现对不同环境的属性配置文件的支持

通过application.yml设置spring.profile.active来使用对应的文件。 例如: 通过application.yml设置spring.profile.active=dev 使用对应的application-dev.yaml配置文件,不过application.yml也是有效
posted @ 2023-09-11 21:35  xiuer211  阅读(13)  评论(0编辑  收藏  举报