IntelliJ: Cannot resolve symbol 'springframework'

enter image description here

Click on refresh button .Maven may not be able to sync properly


I had the same problem, and this is how it worked for me:

On the source root directory -> right click -> Add Framework Support.

A window will open with different categories, such as Java EE, JBoss etc. Go to 'Spring' category. Then, download the pack of libraries that you need (I used 'Spring MVC').


Add dependency for springframework in pom.xml and run below command from directory where pom.xml exist.

mvn clean install -U

Above command will forcefully download the dependencies.

if you are behind proxy then try below command

mvn clean install -DproxySet=true -DproxyHost=www-proxy.us.com -DproxyPort=80

In my case triggering an Invalidate Caches/Restart helped IntelliJ now find those dependencies.

The Invalidate Caches/Restart option

Following what Mr. BlueSky told in his answer here, I could get the dependencies downloaded. Actually, the answer by Vinayak Shedgeri should have helped too. For those whom it didn't, you could try the invalidate cache/restart.

P. S.: And going by what could have caused this behavior, you could very well try something as simple as relaunching IntelliJ first. Just a guess.