您当前的位置: 首页 >  spring boot

ITKEY_

暂无认证

  • 2浏览

    0关注

    732博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

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

ITKEY_ 发布时间:2022-03-02 23:45:00 ,浏览量:2

背景

我在新建微服务项目的时候,使用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

关注
打赏
1665243900
查看更多评论
立即登录/注册

微信扫码登录

0.0646s