springboot 多环境配置 按 2.4版本 之前的配置会报这个错误
Property 'spring.config.activate.on-profile' imported from location 'class path resource [application-dev.yml]' is invalid in a profile specific resource [origin: class path resource [application-dev.yml]
正确配置如下
application.yml
spring:
profiles:
active: dev
application-dev.yml
spring:
config:
activate:
on-profile:
- dev