6

我正在开发一个基于 gradle 的 Spring Boot 项目,该项目从“repo.spring.io”下载一些依赖项。该应用程序过去可以正常工作,但现在我在下载依赖项阶段看到错误。

当应用程序继续下载https://repo.spring.io/libs-milestone/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar时,我收到 HTTP 响应错误代码 401(未经授权)。

我不确定 repo.spring.io 端最近是否有一些变化,因为这曾经在我的应用程序上工作过,没有任何问题。

这是我得到参考的确切错误-

What went wrong:
19:44:19 A problem occurred configuring project ':account_settings-service'.
19:44:19 > Could not resolve all files for configuration ':account_settings-service:classpath'.
19:44:19    > Could not download commons-logging.jar (commons-logging:commons-logging:1.1.3)
19:44:19       > Could not get resource 'https://repo.spring.io/libs-milestone/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar'.
19:44:19          > Could not HEAD 'https://repo.spring.io/libs-milestone/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar'. Received status code 401 from server: Unauthorized 

如果有人对此有任何想法或观察到类似问题,请提供帮助。

提前致谢!

4

1 回答 1

4

根据这个问题的答案,Spring 团队将 kibbosh 放在免费加载者上,使用他们的存储库作为公共分发渠道。

看起来您需要调整您的{build thingy},以便它不会尝试从https://repo.spring.io/libs-milestone/下载

如果commons-logging:commons-logging:1.1.3是 Apache 项目,“Maven Central”(又名https://repo.maven.apache.org/maven2/,是 Apache 存储库)托管https://repo.maven.apache.org/maven2/ commons-logging/commons-logging/1.1.3/没有限制。

于 2020-11-23T12:42:24.890 回答