Home > other >  Dependency 'mysql:mysql-connector-java:8.0.29' not found
Dependency 'mysql:mysql-connector-java:8.0.29' not found

Time:06-11

enter image description here

I have added jar file on the left side. But it still has error. How to solve it?

CodePudding user response:

The dependencies are red because Maven cannot find them in your local cache. Unless you've turned auto-reload on, you need to

Then wait for the reload to complete.

As a note, Maven is a build automation tool which is meant to manage dependencies for you. Adding them directly through IntelliJ circumvents that. If you're using Maven it's generally preferable not to add additional dependencies like that unless you intend for it to only work that way on your local machine.

CodePudding user response:

Sometimes I find that IntelliJ has issues with dependencies.

When it does, I immediately go to the File menu and find Invalidate Caches and Restart. This usually fixes whatever issues I might have with Maven dependencies.

  • Related