java - eclipse中的Spring Boot项目设置错误
问题描述
我已经使用https://start.spring.io/创建了一个项目,当我将该项目导入我的 Eclipse 时,它给出了错误
Project build error: Non-resolvable parent POM for
com.spring:micro-finance:0.0.1-SNAPSHOT: Could not transfer artifact
org.springframework.boot:spring-boot-starter-parent:pom:2.2.6.RELEASE from/to
uk.maven.org (https://repo1.maven.org/maven2): Failed to authenticate with proxy and 'parent.relativePath' points at no local POM pom.xml /project-name line
5 Maven pom Loading Problem
这是我的 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.2.6.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.spring</groupId>
<artifactId>Demo</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>Demo</name>
<description>Demo project in 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>
我在 apache-maven-3.6.0\conf\settings.xml 中添加了 porxy 详细信息
我有另一个项目在 Eclipse 中完美运行,它的 Spring Boot 版本是 2.1.2.RELEASE,当我将上述项目更改为 2.1.2.RELEASE 版本时,错误正在得到解决。
解决方案
推荐阅读
- pine-script - 如何绘制一次形状并在满足另一个条件时停止绘制?
- encryption - ECIES:在 Javascript 中加密并在 Java/Kotlin 中解密
- javascript - 使中心上的 React Native FlatList 项目始终处于活动状态
- python - 将两个参数传递给 skicit model.predict()
- uwp - 系统进入睡眠模式时,Uwp 应用程序崩溃
- excel - 启动特定版本的 Excel
- symfony - 如何在表单类型扩展上删除表单 EventSubscriber?
- asp.net-core - 如何从 .NetCore 评估 JavaScript 代码
- separator - 在 C++ 中,函数定义中的括号是运算符还是分隔符/标点符号?
- objective-c - 回调方法未从库中触发