web123456

springboot:appearedCould not transfer artifact :spring-boot-et al. Problem solving

catalogs

  • 1. The problem
  • 2. Principle analysis
  • 3. Solutions

1. The problem

If the following error message appears:

Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.2. from/to central (/maven2): D:\maven\course-repository\org\springframework\boot\spring-boot-starter-parent\2.2.\spring-boot-starter-parent-2.2. (The system cannot find the specified path。)

Screenshots are shown below:
在这里插入图片描述

2. Principle analysis

Problems such as the above occur roughlymaven When compiling and executing the program, the package cannot be imported.
在这里插入图片描述
The code is also in red

  1. Make sure maven is introduced (it's also critical that it's introduced correctly)
    Related articles on maven can be found in my previous post:
    Maven detailed configuration (full)
    Maven Hands-on from Beginner to Master (full)

After correctly importing maven, it is still red, most of this problem is the problem of importing springboot project, the package can not be imported into the problem, the maven configuration path and other information is not wrong.

  1. ssl security checks, need to verify, need to skip this rule
    Then add this line of code to the setting location
-=true -=true
  • 1

3. Solutions

Specific configuration items are mainly through the following: (GUI)
在这里插入图片描述
After adding it and saving it, you also need to re-clean, compile, and repackage it via maven.
(Just take some time to download)

Final result: (correctly formatted fonts will be displayed after a successful import)
在这里插入图片描述