springboot通过maven下载依赖失败解决


公司直接用不了内网遇到的好的坑。导入网上的springboot项目的启动入口一致有报错,如:Cannot resolve symbol 'SpringApplication'

maven配置设置都做了还是不行,但是idea下载依赖包没有过程,看到repository中也没有架包,经过一系列判断找到maven的setting.xml文件要配置代理(一直以为是intellij idea里面配置),还有就是pom.xml文件需要的依赖jar如果没有下载成功会被intellij idea标红的。(开源项目:https://github.com/HeyJC/QRCodeLogin)

解决方法:

到的maven的安装目录,修改conf/settings.xml

  <proxies>
    <!-- proxy
     | Specification for one proxy, to be used in connecting to the network.
     |
    <proxy>
      <id>optional</id>
      <active>true</active>
      <protocol>http</protocol>
      <username>proxyuser</username>
      <password>proxypass</password>
      <host>proxy.host.net</host>
      <port>80</port>
      <nonProxyHosts>local.net|some.host.com</nonProxyHosts>
    </proxy>
    -->
     <proxy>
      <id>optional</id>
      <active>true</active>
      <protocol>http</protocol>
      <host>11.11.11.2</host>
      <port>8080</port>
    </proxy>
  </proxies>

 

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM