在开发过程中如果需要其他的配置文件,全部写到application.yml中感觉太臃肿,这时,我们可以将yml拆分成多个yml或者properties文件
application-test.yml application-prod.yml application-dev.yml
spring: profiles: include: test,api,jdbc
注意,不能换行,include:下面的test,api,jdbc,多个用英文逗号分隔
@Value('${qq.key}') private String qq @Value('${weixin.key}') private String weixin @Value('${a.b.c}') private String t @Value('${aa.bb}') private String tt
如果觉得我的文章对您有用,请随意打赏。你的支持将鼓励我继续创作!