IntelliJ: Cannot resolve symbol ‘springframework’

We Are Going To Discuss About IntelliJ: Cannot resolve symbol ‘springframework’. So lets Start this Java Article.

IntelliJ: Cannot resolve symbol ‘springframework’

  1. IntelliJ: Cannot resolve symbol 'springframework'

    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').

  2. IntelliJ: Cannot resolve symbol 'springframework'

    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').

Solution 1

enter image description here

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

Original Author Vinayak Shedgeri Of This Content

Solution 2

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’).

Original Author MrBlueSky Of This Content

Solution 3

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

Original Author SaravanaKumar KKB Of This Content

Solution 4

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.

Original Author Harshith Rai Of This Content

Conclusion

So This is all About This Tutorial. Hope This Tutorial Helped You. Thank You.

Also Read,

Siddharth

I am an Information Technology Engineer. I have Completed my MCA And I have 4 Year Plus Experience, I am a web developer with knowledge of multiple back-end platforms Like PHP, Node.js, Python and frontend JavaScript frameworks Like Angular, React, and Vue.

Leave a Comment