Unmapped Spring configuration files found. Why?


I created a Spring project in STS, and then imported it as a Maven project into IDEA. Now when I open the project in IDEA I get a warning that reads:

> Spring Configuration Check
> Unmapped Spring configuration files found. Disable... Please configure Spring facet or use 'Create Default Context' to add one including all unmapped files. > Show Help m-squadrun (4 files)   Create Default Context

Can someone help me understand the meaning behind this warning that appears in IDEA but not STS?


Normally you should choose Create Default Context option and it should work fine. See https://www.jetbrains.com/help/idea/2016.1/managing-spring-configuration-files.html for details.


But in big multimodule projects one can have tens of such modules and then he has to click many times. It's really annoying and should be automated!


That issue for Maven, and the linked one for Gradle/SBT (IDEA-168156) are both marked as fixed. It's not clear to me from the issue comments what the fix was or how it is supposed to work. When I import the multi-module Gradle project I'm working into 2020.1.3 I get that pop-up, and have to click "Create Default Context" some 30-odd times.

It's extra tedious because the popup takes a couple seconds to dismiss and reload each time. The "Create Default Context" link is a moving target amongst other links due to varying module name lengths, so you can't even rage click through them all. I also often have to keep multiple simultaneous checkouts, each as separate IntelliJ projects, due to significantly diverged maintenance branches. This process has to be repeated for each.

Might there be something wrong with my project setup that it's not automatically creating the default context configurations for these modules, or is this how it still works even after the IDEA-168154 and IDEA-168156 fixes?

If the latter, the pop-up could really use a "Create Default Context for All" button.


Could you please file a new bug for this usability problem at https://youtrack.jetbrains.com/newIssue?project=IDEA ? Thank you.


Please sign in to leave a comment.