【新建Spring Boot项目】Connect to 127.0.0.1:1087 [/127.0.0.1] failed: Connection refused

28 篇文章 1 订阅

背景

我在新建微服务项目的时候,使用gradle报错Connect to 127.0.0.1:1087 [/127.0.0.1] failed: Connection refused 。然后我检查了一下IDEA的代理设置,没有使用代理。

报错信息

A problem occurred configuring root project 'microcloud'.
> Could not resolve all artifacts for configuration ':classpath'.
   > Could not resolve org.springframework.boot:spring-boot-gradle-plugin:2.2.5.RELEASE.
     Required by:
         project :
      > Could not resolve org.springframework.boot:spring-boot-gradle-plugin:2.2.5.RELEASE.
         > Could not get resource 'https://maven.aliyun.com/repository/public/org/springframework/boot/spring-boot-gradle-plugin/2.2.5.RELEASE/spring-boot-gradle-plugin-2.2.5.RELEASE.pom'.
            > Could not GET 'https://maven.aliyun.com/repository/public/org/springframework/boot/spring-boot-gradle-plugin/2.2.5.RELEASE/spring-boot-gradle-plugin-2.2.5.RELEASE.pom'.
               > Connect to 127.0.0.1:1087 [/127.0.0.1] failed: Connection refused (Connection refused)

* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.

从Connect to 127.0.0.1:1087 中可以看出,应该是我之前设置了什么代理服务器

解决办法

编辑用户目录下的.gradle/gradle.properties文件。

vim ~/.gradle/gradle.properties

删除或者注释systemProp.http与systemProp.https开头的配置。
在这里插入图片描述
然后问题就成功解决了。
在这里插入图片描述

参考

https://www.jianshu.com/p/0c1efb95178a

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值