錯誤:
2021-03-03 16:40:26.634 INFO 10744 --- [ main] c.c.c.ConfigServicePropertySourceLocator : Fetching config from server at: http://localhost:8888
2021-03-03 16:40:27.771 WARN 10744 --- [ main] c.c.c.ConfigServicePropertySourceLocator : Could not locate PropertySource: I/O error on GET request for "http://localhost:8888/application/default": Connection refused: connect; nested exception is java.net.ConnectException: Connection refused: connect
2021-03-03 16:40:27.772 INFO 10744 --- [ main] com.saicmotor.ccm.admin.CcmAdminApp : No active profile set, falling back to default profiles: dev
可能的原因
1.檢查idea jvm 參數是否配置
2.若步驟1已配置,但是還是無法讀取配置,則檢查模塊 resources 爲 resources 文件夾
file->project structure->modules
圖中可以發現此時的resources 並不是 Resources文件夾,這就是導致項目無法讀取配置文件內容
3.選中resources 文件夾 然後點擊Resources目錄 ,即改變目錄屬性