美文网首页
Consider defining a bean of type

Consider defining a bean of type

作者: Kamiya_ | 来源:发表于2021-02-04 15:59 被阅读0次
***************************
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.

检查pom.xml文件

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

        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-gateway</artifactId>
        </dependency>

原因: 包冲突 spring-cloud-starter-gateway中 包含 spring-boot-starter-web, 删掉后者即可;

相关文章

网友评论

      本文标题:Consider defining a bean of type

      本文链接:https://www.haomeiwen.com/subject/kuvbtltx.html