Gateway網關不能依賴spring-boot-starter-webGateway,網關使用@EnableDiscoveryClient飄紅無法引入依賴

ldj2020 2022-07-23 21:35:46 阅读数:322

gateway不能spring-boot-starter-webgatewayspringboot

 xxxx-common 中引入spring-boot-starter-web 需要排除掉 

 <dependencies>
<dependency>
<groupId>com.xxx.zzzz</groupId>
<artifactId>xxxx-common</artifactId>
<version>0.0.1-SNAPSHOT</version>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</exclusion>
</exclusions>
</dependency>
Gateway網關使用@EnableDiscoveryClient飄紅無法引入依賴
 <parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.3.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>

版权声明:本文为[ldj2020]所创,转载请带上原文链接,感谢。 https://gsmany.com/2022/204/202207232126173630.html