[英]Getting Project 'org.springframework.boot:spring-boot-starter-parent:2.6.0-SNAPSHOT' not found
I am trying to create a spring boot project in IntelliJ Idea.我正在尝试在 IntelliJ Idea 中创建一个 Spring Boot 项目。 I tried creating a project from Spring initializr.
我尝试从 Spring initializr 创建一个项目。 But when I unzip it and run it on my IDE, it keeps repeating the same error:
但是当我解压缩它并在我的 IDE 上运行它时,它不断重复相同的错误:
Project 'org.springframework.boot:spring-boot-starter-parent:2.6.0-SNAPSHOT' not found
未找到项目“org.springframework.boot:spring-boot-starter-parent:2.6.0-SNAPSHOT”
Tried using other versions of Spring Boot, but still the same error.尝试使用其他版本的Spring Boot,但还是同样的错误。 I have also tried solutions provided on other posts earlier, but none of them work for me.
我也尝试过之前在其他帖子中提供的解决方案,但没有一个对我有用。
my pom.xml file我的 pom.xml 文件
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.6.0-SNAPSHOT</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.upgrad</groupId>
<artifactId>demoApp</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>demoApp</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>16</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
</repository>
<repository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
</pluginRepository>
<pluginRepository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
</pluginRepository>
</pluginRepositories>
</project>
Thanks!谢谢!
试试 2.2.6.RELEASE 版本,对我有用。
Try to clean your local maven repository.尝试清理您的本地 Maven 存储库。 Mine was corrupted and the following lines solved the problem :
我的已损坏,以下几行解决了问题:
rm -rf ~/.m2/repository
rm -rf ~/.m2/wrapper
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.