首页 > 其他分享 >@EnableEurekaServer注解不可用

@EnableEurekaServer注解不可用

时间:2022-12-05 13:24:08浏览次数:44  
标签:spring 不可 springframework pom starter org 注解 cloud EnableEurekaServer

1.可能是springBoot版本和spingCloud版本不匹配

parent pom做了如下修改

<!--基于springboot开发-->
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.6.RELEASE</version>
<relativePath/>
</parent>
<!--父工程引入springcloud配置-->
<dependencyManagement>
<dependencies>

<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>Edgware.SR4</version>
<!--Dalston.SR3-->
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
子工程中pom添加
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-eureka-server</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-server</artifactId>
</dependency>
可参考 :https://blog.csdn.net/weixin_39800144/article/details/83152611/

标签:spring,不可,springframework,pom,starter,org,注解,cloud,EnableEurekaServer
From: https://www.cnblogs.com/shuqing0803/p/16952012.html

相关文章