解决Parameter 0 of method modifyRequestBodyGatewayFilterFactory in org.springfra。。。
报错信息:***************************APPLICATION FAILED TO START***************************Description:Parameter 0 of method modifyRequestBodyGatewayFilterFactory in org.springframework.cloud.gat...
报错信息:
***************************
APPLICATION FAILED TO START
***************************
Description:
Parameter 0 of method modifyRequestBodyGatewayFilterFactory in org.springframework.cloud.gateway.config.GatewayAutoConfiguration required a bean of type 'org.springframework.http.codec.ServerCodecConfigurer' that could not be found.
Action:
Consider defining a bean of type 'org.springframework.http.codec.ServerCodecConfigurer' in your configuration.
网上有人说:
原因:
依赖冲突,spring-cloud-starter-gateway与spring-boot-starter-web和spring-boot-starter-webflux依赖冲突
解决:
排除 spring-boot-starter-web和spring-boot-starter-webflux依赖
但是我并没有添加这两个依赖,后发发现,
网关gateway添加了依赖:
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-hateoas</artifactId> <version>2.1.2.RELEASE</version> </dependency>
该依赖中有web依赖,导致冲突。去除该依赖即可
更多推荐
所有评论(0)