spring security依赖的maven构建错误

发布于 2025-01-10 03:32:25 字数 1913 浏览 0 评论 0原文

我的 Spring Boot 项目出现 Maven 构建错误 我在 pom.xml 中添加了 Spring Security,但完整的 Maven 构建

依赖项:

<!-- https://mvnrepository.com/artifact/org.springframework.security/spring-security-web -->
     <dependency>
    <groupId>org.springframework.security</groupId>
    <artifactId>spring-security-web</artifactId>
    <version>5.5.0-M1</version>
    </dependency>

错误:

[WARNING] Could not transfer metadata net.minidev:json-smart/maven-metadata.xml from/to 
SpringFramework (https://maven.springframework.org/milestone/): Authorization failed for 
https://maven.springframework.org/milestone/net/minidev/json-smart/maven-metadata.xml 403 
Forbidden
[WARNING] The POM for org.springframework.security:spring-security-web:jar:5.5.0-M1 is 
missing, no dependency information available
[WARNING] The POM for org.springframework.security:spring-security-config:jar:5.5.0-M1 is 
missing, no dependency information available
[WARNING] The POM for org.springframework.security:spring-security-core:jar:5.5.0-M1 is 
missing, no dependency information available

[ERROR] Failed to execute goal on project gtt-v2-sample-track-salesorders-service: Could not 
resolve dependencies for project com.sap.gtt.v2:gtt-v2-sample-track-salesorders- 
service:jar:1.0.0: The following artifacts could not be resolved: 
org.springframework.security:spring-security-web:jar:5.5.0-M1, 
org.springframework.security:spring-security-config:jar:5.5.0-M1, 
org.springframework.security:spring-security-core:jar:5.5.0-M1: Failure to find 
org.springframework.security:spring-security-web:jar:5.5.0-M1 in 
https://maven.springframework.org/milestone/ was cached in the local repository, resolution 
will not be reattempted until the update interval of SpringFramework has elapsed or updates are forced -> [Help 1]

我需要更改任何内容吗?如何解决问题

i am getting maven build error for my spring boot project i added spring security in my pom.xml but complete maven build

Dependency:

<!-- https://mvnrepository.com/artifact/org.springframework.security/spring-security-web -->
     <dependency>
    <groupId>org.springframework.security</groupId>
    <artifactId>spring-security-web</artifactId>
    <version>5.5.0-M1</version>
    </dependency>

Error:

[WARNING] Could not transfer metadata net.minidev:json-smart/maven-metadata.xml from/to 
SpringFramework (https://maven.springframework.org/milestone/): Authorization failed for 
https://maven.springframework.org/milestone/net/minidev/json-smart/maven-metadata.xml 403 
Forbidden
[WARNING] The POM for org.springframework.security:spring-security-web:jar:5.5.0-M1 is 
missing, no dependency information available
[WARNING] The POM for org.springframework.security:spring-security-config:jar:5.5.0-M1 is 
missing, no dependency information available
[WARNING] The POM for org.springframework.security:spring-security-core:jar:5.5.0-M1 is 
missing, no dependency information available

[ERROR] Failed to execute goal on project gtt-v2-sample-track-salesorders-service: Could not 
resolve dependencies for project com.sap.gtt.v2:gtt-v2-sample-track-salesorders- 
service:jar:1.0.0: The following artifacts could not be resolved: 
org.springframework.security:spring-security-web:jar:5.5.0-M1, 
org.springframework.security:spring-security-config:jar:5.5.0-M1, 
org.springframework.security:spring-security-core:jar:5.5.0-M1: Failure to find 
org.springframework.security:spring-security-web:jar:5.5.0-M1 in 
https://maven.springframework.org/milestone/ was cached in the local repository, resolution 
will not be reattempted until the update interval of SpringFramework has elapsed or updates are forced -> [Help 1]

do i need to change anything, how to resolve issue

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

落花浅忆 2025-01-17 03:32:25

将 spring boot 的版本更改

<dependency>
    <groupId>org.springframework.security</groupId>
    <artifactId>spring-security-web</artifactId>
    <version>5.5.0</version>
</dependency>

为此

change the version of the spring boot

<dependency>
    <groupId>org.springframework.security</groupId>
    <artifactId>spring-security-web</artifactId>
    <version>5.5.0</version>
</dependency>

to this

謸气贵蔟 2025-01-17 03:32:25

5.5.0 和 5.5.1 版本存在一些漏洞。
请参阅此处的详细信息:
https://mvnrepository.com/artifact/org。 springframework.security/spring-security-web/5.5.1

请在代码中使用建议的版本 5.6.2(没有这些漏洞)。

更改版本,然后运行 ​​mvn -U clean install 更新 spring 依赖版本。如果您使用代理,请确保在 settings.xml 中添加代理详细信息,如此处所述

There are some vulnerabilities for version 5.5.0 and 5.5.1.
See the details here:
https://mvnrepository.com/artifact/org.springframework.security/spring-security-web/5.5.1

Please use the suggested version 5.6.2 (which doesn't have those vulnerabilities) in your code.

Change the version and then run mvn -U clean install to update the spring dependency version. If you are behind a proxy, ensure that you have the proxy details added in your settings.xml as mentioned here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文