How to solve the accidental import dependency in the Maven project, but it keeps reporting an error, unresolved dependency

Problem Description

It was all good before, no problem.
After I imported the dependencies, it was always marked in red.
Insert picture description here
Insert picture description here

problem solved

  • Make sure that the company id, project id and version number are correct

  • Find the maven local warehouse, if it has not been modified, it will be in the C:\user:admin.m2\repository path, delete the package you want to rely on

  • Or you can see the local repository in file--settings--build,execution,deploy··--build tools--maven--local repositoryInsert picture description here

  • Then re-import the dependencies

If this problem can be solved, it means that an error occurred when the previous dependency was downloaded to the local warehouse, just delete it and download it again.

Guess you like

Origin blog.csdn.net/qq_34687559/article/details/111997975