What you have already done works fine with Spring Boot, although the IDE does not recognize these properties. What Robert Tomton suggested is the way to go if you want to improve the IDE's work with yaml Spring Boot configuration files.
IntelliJ workaround
These yellow markers in IntelliJ are warning markers that come from validation (preferences β editor β validations). In many cases, these markers can be ignored, as they are often false positives when using the new functions of frameworks and languages. Therefore, if they bother you, you can disable them only for Yaml files.
Further research
For this you need to have spring-boot-configuration-processor as a dependency
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-configuration-processor</artifactId> <optional>true</optional> </dependency>
IntelliJ seems to use spring-configuration-metadata.json to identify the mappings used in the yaml Spring Boot Configuration files. This corresponds to the Spring Boot Configuration Metadata Documentation . The metadata file you listed does not contain entries for the NestedObject properties. If you hover over the yellow lines and go to the quick fix, IntelliJ will offer a fix:
IntelliJ will create this file for you:
Warnings do not immediately disappear. But if you do a clean build (depending on your build tool), they will go away.
If you now open target / META-INF / spring-configuration-metadata.json, you can see that Spring Boot has added the contents of the additional spring-configuration-metadata.json that the previous one generates a "quick fix".
You can modify this additional spring-configuration-metadata.json file to provide additional information for the IDE, such as valid property values. We hope that with time IntelliJ will be smart enough, so we do not need to manually edit this file.
This was done for the initial warnings, but now, if you look at application.yaml, you can see some new warnings: