JAVA技术交流QQ群:170933152 POM.XML中需要加入,这样就好了: <dependencyManagement> <dependencies> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-dependencies</artifactId> <version>${spring-cloud.version}</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencyManagement>
SpringCloud工作笔记033---找不到import org.springframework.cloud.client.discovery.EnableDiscoveryClient;无法导入
最新推荐文章于 2024-08-03 12:00:14 发布
在使用SpringCloud时遇到找不到`import org.springframework.cloud.client.discovery.EnableDiscoveryClient;`的问题。解决方法是在POM.XML文件中添加依赖管理部分,引入`spring-cloud-dependencies`并指定合适的版本。
摘要由CSDN通过智能技术生成