It seems that Spring Boot 2.7.0 version does not inject empty injection in the properties file in Gradle at compile time, so it is underlined in red.
Spring Boot 2.5.0 version Images
Spring Boot 2.7.0 version images
application.properties same image
Comment From: snicoll
@cwangg897 this has nothing to do with Spring Boot. Spring Boot 2.7 has moved to a new location for auto-configuration imports. You need a new version of IntelliJ IDEA to support this.
See https://youtrack.jetbrains.com/issue/IDEA-289633/Spring-Boot-new-auto-configuration-registration-in-v-27