springCloud-Gateway 出现org.springframework.http.codec.ServerCodecConfigurer‘ that could not be found
springCloud-Gateway 出现org.springframework.http.codec.ServerCodecConfigurer’ that could not be found错误Spring MVC与Spring Cloud网关不兼容。请删除spring-boot-start-web依赖项。因为spring cloud gateway是基于webflux的,如果非要web支
·
springCloud-Gateway 出现org.springframework.http.codec.ServerCodecConfigurer’ that could not be found错误
Spring MVC与Spring Cloud网关不兼容。请删除spring-boot-start-web依赖项。
因为spring cloud gateway是基于webflux的,如果非要web支持的话需要导入spring-boot-starter-webflux而不是spring-boot-start-web。
或者添加
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
</exclusion>
</exclusions>
</dependency>
更多推荐
已为社区贡献1条内容
所有评论(0)