Solve the problem of invalidation of idea maven dependency introduction

I just started the idea recently, but the maven dependency problem inside is really a headache. The code becomes popular when I click on it. Open Project Structure -> as shown below:

Prompt that libarary has broken path, the ctrl related dependencies in the pom.xml file of the project can't be clicked, and the related references in the code are also red!

Ok, the problem is ok! The dependency is invalid!

Tried the commonly used routines on the Internet:

1. Right-click pom.xml -> maven -> reimport;

2.File -> Invalidate Caches / Restart...;

3. Add the exact version number to the corresponding dependency in the pom file;

。。。。

invalid! Here I want to say the simplest and most effective:

File -> Project Structure -> Libraries -> Click the "+" in the upper left corner of the dependency list -> from Maven... -> Enter the dependency keyword to search (it is recommended to enter the pom file

artifactId, wait depending on the network situation );

 

Guess you like

Origin blog.csdn.net/weixin_41346635/article/details/82710559