spring-cloud-starter-gateway踩坑

java 复制代码
1.bean of type 'org.springframework.http.codec.ServerCodecConfigurer' that could not be found.
需要将项目中用到的spring-boot-starter-web依赖给去掉
去掉以下的
<dependency>
	<groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
</dependency>

2.springfox.documentation.service.ApiInfo
需要将项目中用到的关于swagger的依赖去掉例如knife4j-spring-boot-starter这个依赖需要集成spring-boot-starter-web
去掉以下的
<dependency>
	<groupId>com.github.xiaoymin</groupId>
	<artifactId>knife4j-spring-boot-starter</artifactId>
</dependency>
3.建议微服务项目,不要使用那么多层级的父子工程嵌套和集成,否则很容易出现这种问题,耦合度太高了
相关推荐
q***06294 小时前
springcloud-eureka与gateway简易搭建
spring cloud·eureka·gateway
百***618717 小时前
SpringCloud Gateway 集成 Sentinel 详解 及实现动态监听Nacos规则配置实时更新流控规则
spring cloud·gateway·sentinel
f***68602 天前
springcloud-eureka与gateway简易搭建
spring cloud·eureka·gateway
q***61502 天前
当遇到 502 错误(Bad Gateway)怎么办
gateway
q***38512 天前
IP地址、子网掩码(NETMASK)和网关(Gateway)
tcp/ip·gateway·智能路由器
pengzhuofan4 天前
Gateway微服务网关
微服务·架构·gateway
g***86694 天前
springcloud-eureka与gateway简易搭建
spring cloud·eureka·gateway
q***65694 天前
Nginx反向代理出现502 Bad Gateway问题的解决方案
运维·nginx·gateway
NGINX开源社区4 天前
将部署从 NGINX Ingress Controller 迁移至 NGINX Gateway Fabric
nginx·gateway·fabric
h***06654 天前
SpringCloud Gateway 集成 Sentinel 详解 及实现动态监听Nacos规则配置实时更新流控规则
spring cloud·gateway·sentinel