Using Boot 2.7.5 I have this application.yaml
spring:
config.use-legacy-processing: true
application:
name: demo
logging:
level:
org.springframework.web: info
---
spring:
config:
activate:
on-profile: local
---
spring:
config:
activate:
on-profile: alt
logging:
level:
org.springframework.web: debug
server:
port: 9696
I have no profile enabled when running the app but all 3 documents in this application.yaml are added to the environment when setting use-legacy-processing to true.
When I start the app I notice that Tomcat starts on 9696. When use-legacy-processing is not used the server starts on 8080.
I have attached a sample project that reproduces the problem. demo-2.7.5.zip
Comment From: scottfrederick
With spring.config.use-legacy-processing: true you'll also need to use the legacy style of activating profiles with spring.profiles instead of spring.config.activate.on-profile:
spring:
config.use-legacy-processing: true
application:
name: demo
logging:
level:
org.springframework.web: info
---
spring:
profiles: local
---
spring:
profiles: alt
logging:
level:
org.springframework.web: debug
server:
port: 9696
Comment From: ryanjbaxter
Thanks @scottfrederick that makes sense