This is apparently a limitation with the SnakeYAML parser and a way to use w760> Boot. Since yaml allows you to specify several separate documents in a single file with a delimiter --- , the Spring method separates separate documents from the spring.profiles key, this key is expected to be a simple structure, not a complicated structure unfortunately.
A good workaround is to split this into multiple files this way:
application.yaml with common content, application-<profile> with profile extension, with this structure in place the spring.profiles.include key will work as expected.
source share