intellij - spring is not being recognized (Unmapped Spring configuration)
I am using IntelliJ IDEA and all plugins for Spring are activated, but when I load my Maven project I have the following error:
Spring Configuration Check
Unmapped Spring configuration files found.
Please configure/setup Spring facet for modules
Any ideas what prevented it from being configured automatically?
Solution 1:
You need to do the following:
- Go to the project structure dialog (either by clicking the warning or through file=>project structure
- select the modules item in the left hand list
- go through and right click on the modules with missing files and select Add=>Spring
- in the new tab click the + button
- you should now see a list of the xml files. Check the boxes next to them
It's not entirely clear to me what this achieves apart from getting rid of the warnings! If anyone could shed any light on that it'd be good.
Solution 2:
You need to check which configurations IntelliJ will use to provide inspections on wired beans.
Go to File➝Project Structure➝Project Settings➝Modules.
Select your module and selected (or add) the Spring facet.
In the right area you can add or modify application contexts that are used by your module. Just check every configuartion you need in your context.