java - 项目 'org.springframework.boot:spring-boot-starter-parent:2.4.0' 未找到
问题描述
我正在关注本指南:https ://spring.io/guides/gs/serving-web-content/ ,
<?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 http://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.4.0</version>
<relativePath/>
</parent>
<groupId>org.example</groupId>
<artifactId>plats-bruts</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</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>
但我在 pom 上有这个问题:
Project 'org.springframework.boot:spring-boot-starter-parent:2.4.0' not found
但它在这里https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-parent/2.4.0
解决方案
我刚刚遇到了类似的问题。我正在使用 IntelliJ IDEA Ultimate 2020.2。版本号 2.4.0 是红色的,消息和你的一样。
选择 File -> Invalidate Caches / Restart... 并选择 Invalidate and Restart 选项解决了这个问题。我想这只是一个陈旧的缓存。
推荐阅读
- imagemagick - Imagemagick如何在不丢失颜色的情况下在黑白图像上合成彩色png?
- python-3.x - Django 的 Get Queryset 作为通用函数
- oracle - 在我的代码中出现错误,例如 PLS-00103:遇到符号“NUM_LARGE”
- reactjs - Undefined 不是 React Native 项目中的对象,但 console.log 显示值
- templates - 我可以返回什么对每种类型都有效
? - tensorflow-federated - 在 FL 中,客户可以训练不同的模型架构吗?
- plugins - 地理服务器 2.19.0-MapML
- java - 日期选择器对话框仅显示一个日期
- java-8 - 如果在 API 调用期间出现部分故障,以下 java 代码的输出将是什么?
- java - 您好我正在尝试将 json 数据从 url 显示到 listview 中。虽然什么都没有显示