[英]No suitable cloud connector found Error in IntelliJ Vs Working in Eclipse
我有 spring 啟動應用程序,它在 eclipse 中運行良好。 但不是在 IntelliJ 中。 由於 IDE 之間沒有設置差異,eclipse 使用相同的代碼但不是 IntelliJ 可以正常工作。
智能:
May 18, 2021 6:13:31 PM org.springframework.cloud.localconfig.PropertiesFileResolver findCloudPropertiesFileFromClasspath
WARNING: the properties file spring-cloud-bootstrap.properties contained properties besides spring.cloud.propertiesFile; ignoring
May 18, 2021 6:13:31 PM org.springframework.cloud.localconfig.PropertiesFileResolver findCloudPropertiesFileFromClasspath
INFO: derived configuration file name: src\test\resources\local-service-info.properties
May 18, 2021 6:13:31 PM org.springframework.cloud.localconfig.PropertiesFileResolver findCloudPropertiesFile
INFO: using configuration file derived from spring-cloud-bootstrap.properties
May 18, 2021 6:13:31 PM org.springframework.cloud.localconfig.LocalConfigConnector readFileProperties
INFO: properties file src\test\resources\local-service-info.properties does not exist; probably running in a real cloud
May 18, 2021 6:13:31 PM org.springframework.cloud.localconfig.LocalConfigConnector isInMatchingCloud
INFO: the property spring.cloud.appId was not found in the system properties or configuration file
Exception in thread "main" org.springframework.cloud.CloudException: No suitable cloud connector found
at org.springframework.cloud.CloudFactory.getCloud(CloudFactory.java:55)
at com.comcast.xrm.video.vrs.collector.application.Application.main(Application.java:106)
我看過其他與相同錯誤相關的帖子並嘗試了一些設置。 但沒有運氣。
我的主要 class 包含代碼 new CloudFactory().getCloud(); 作為這個問題的解決方案
任何幫助將不勝感激! 謝謝
我無法解釋為什么這在 Eclipse 和 IntelliJ 中的工作方式不同。 這可能是由於運行配置的差異以及找到文件src\test\resources\local-service-info.properties
的能力:
INFO: properties file src\test\resources\local-service-info.properties does not exist; probably running in a real cloud
但是,您應該知道,Spring Cloud Connectors 庫處於維護模式,不鼓勵使用它以支持更新的Java CFEnv庫。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.