我想通過Maven運行一個簡單的Spring應用程序。使用Maven運行Spring應用程序時出現連接錯誤
我遵循以下指南準確:https://spring.io/guides/gs/serving-web-content/
然而,當我運行:./mvnw spring-boot:run -e -X
我收到以下錯誤:
[FATAL] Non-resolvable parent POM for org.springframework:gs-serving-web-content:0.1.0: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:1.5.2.RELEASE from/to central (https://repo.maven.apache.org/maven2): Connect to 192.168.208.51:3128
在以前的導遊,我被告知要添加此作爲.m2目錄下的settings.xml文件:
<settings>
<proxies>
<proxy>
<id>example-proxy</id>
<active>true</active>
<protocol>http</protocol>
<host>192.168.208.51</host>
<port>3128</port>
<nonProxyHosts>*.google.com|*example.com</nonProxyHosts>
</proxy>
</proxies>
</settings>
其中包含錯誤引用的主機IP地址克到。
我已經ping上面的IP地址,沒有響應。
我想要做的就是在Spring.io指南中建議的本地運行應用程序。
我還沒有完全理解這個設置。
任何人都可以建議我做錯了什麼。 (我覺得這是值得做的settings.xml文件的IP地址。
好了,你有沒有什麼這應該改變任何建議到 – drew
不是真的,你爲什麼想要一個代理?添加一個鏈接到它來的例子? – ThomasRS
啊!我沒有意識到我不需要在設置文件中的代理設置問題解決了,謝謝。 – drew