I don’t know if you have encountered my situation. After all the dependencies of springboot are imported normally, application.properties or application.yml is not recognized normally.
In fact, the file is not scanned and loaded correctly. We can load it manually. solve
Solution 1:
Select maven—"+, select the corresponding pom.xml or yml file and confirm
Solution two
ctrl+alt+s open the setting to
find the text file in the File type, delete the *.yaml inside and
maven-reimport to return to normal.
Solution three:
open the project structure directory -> Project Settings -> facets -> select Corresponding project -> Click the + sign to load the configuration file such as xx.xml.
If it has not been resolved, mark the resources folder as other and then re-mark it as resources root and it will be OK.