Intellij Idea配置springBoot多环境/配置文件

因为项目需要,需要每个微服务对应各自名称的配置文件.所有有了本文.

配置文件名称: application-api.properties

方法一 : 设置 Active profiles

方法二: Program arguments:输入指令 --spring.profiles.active=api

方法三: Environment variables: 输入spring.profiles.active=dev

发布了295 篇原创文章 · 获赞 783 · 访问量 32万+

猜你喜欢

转载自blog.csdn.net/zhanglong_4444/article/details/103822931