我的項(xiàng)目依賴于spring-boot-starter-cloud-connectors和spring-cloud-localconfig-connector。這是我的代碼:@Configurationclass MyConfig { @Bean public CloudFactory cloudFactory() { CloudFactory cf = new CloudFactory(); cf.registerCloudConnector(new LocalConfigConnector()); return cf; }}@Componentclass MyComponent { @Autowired CloudFactory cf; @EventListener(value = ApplicationStartedEvent.class) public void postConstruct() { Cloud cloud = cf.getCloud(); }}當(dāng)我嘗試在本地運(yùn)行上述代碼時(shí),出現(xiàn)異常:org.springframework.cloud.CloudException:找不到合適的云連接器雖然,父母的版本無(wú)關(guān)緊要,但我正在使用2.1.8.RELEASE.有人能指出上面的代碼有什么問(wèn)題嗎?
CloudException:找不到合適的云連接器
繁華開(kāi)滿天機(jī)
2023-09-06 17:11:36