在manage的项目,使用boot整合cloud的eureka-server注册中心的时候,遇到的坑

项目一直出现加载项目就报错的问题。后面把jar包的顺序调节了先后顺序,加载就避开了异常。
如图:将eureka的jar包放在spring-boot-starter-web的前面,问题就解决了。不知道原因。网上也找不到。

<dependency>
  <groupId>org.springframework.cloud</groupId>
  <artifactId>spring-cloud-starter-eureka-server</artifactId>
</dependency>
<dependency>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-starter-web</artifactId>
</dependency>

启动成功后,再度把顺序调换回来。项目一切正常。玄学问题。以结果为导向。

猜你喜欢

转载自blog.csdn.net/laughing1997/article/details/83115338