IDEA does not recognize application.properties or application.yml or pom.xml files

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
Insert picture description here

Solution 1:
Select maven—"+, select the corresponding pom.xml or yml file and confirm
Insert picture description here

Solution two
ctrl+alt+s open the setting to
find the text file in the File type, delete the *.yaml inside and
Insert picture description here
maven-reimport to return to normal. Insert picture description here
Insert picture description here
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.

Guess you like

Origin blog.csdn.net/weixin_43158695/article/details/104717561