[英]Dependency 'org.springframework.boot:spring-boot-starter-web:2.3.0.RELEASE' not found
I am having a problem while creating a simple spring boot
web application.我在创建一个简单的spring boot
web 应用程序时遇到问题。 I am building this app using Intellij Idea IDE.我正在使用 Intellij Idea IDE 构建这个应用程序。 There is a issue arising related to the dependency.出现了与依赖相关的问题。 Intellij is saying - Dependency 'org.springframework.boot:spring-boot-starter-web:2.3.0.RELEASE' not found
(in pom.xml
). Intellij 说 - Dependency 'org.springframework.boot:spring-boot-starter-web:2.3.0.RELEASE' not found
(在pom.xml
中)。
Detailed Error Information:详细错误信息:
Dependency 'org.springframework.boot:spring-boot-starter-web:2.3.0.RELEASE' not found.
Tag name: artifactId Description : The unique id for an artifact produced by the project group, e.g. maven-artifact. Version : 3.0.0+
<?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.3.0.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.example</groupId>
<artifactId>springboot-demo</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>springboot-demo</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>1.8</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>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
If invalidate Caches / Restart...
doesn't work, check Always update snapshots
from "File -> Settings -> Building, Execution, Deployment -> Build Tools -> Maven".如果无效Caches / Restart...
不起作用,请检查Always update snapshots
。 For me worked like a charm.对我来说,工作就像一个魅力。
I was having the exact same problem then I found a way to overcome that.我遇到了完全相同的问题,然后我找到了克服它的方法。 I am not an expert on Spring Boot so I don't know what causes this but I can help you to fix.我不是 Spring 引导方面的专家,所以我不知道是什么原因造成的,但我可以帮你解决。 Go to https://start.spring.io/ then Click on the add dependencies on the top right corner of the pic. Go 到https://start.spring.io/然后点击图片右上角的添加依赖项。 after that select Spring Web under the dropdown menu, then generate the initializr again.之后在下拉菜单下的 select Spring Web ,然后再次生成初始化程序。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.