1. 程式人生 > >學習Spring Boot和Spring Cloud踩過的那些坑

學習Spring Boot和Spring Cloud踩過的那些坑

1、Eclipse安裝了STS以後,新建一個SpringStarter,出現SocketTimeoutException:Read timed out。


解決:在瀏覽器中測試http://start.spring.io/,可以訪問到。

過了一段時間後,重試,竟然正常了,可以新建專案了。可能是網路不穩定。

2、配置eureka服務發現專案時,在java下寫了Application.java,在resource下寫了yml檔案,啟動報錯:Your ApplicationContext is unlikely to start due to a @ComponentScan of the default package

** WARNING ** : Your ApplicationContext is unlikely to start due to a @ComponentScan of the default package.
解決:因為application.Java 檔案不能直接放在main/java資料夾下,必須要建一個包把他放進去