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.建议微服务项目,不要使用那么多层级的父子工程嵌套和集成,否则很容易出现这种问题,耦合度太高了
相关推荐
blammmp2 天前
Spring Cloud:Gateway(统一服务入口)
spring·spring cloud·gateway
Nerd Nirvana2 天前
网关GateWay——连接不同网络的关键设备
网络·mqtt·计算机网络·gateway·路由器·modbus·电力设备
Paran-ia3 天前
【2025版】SpringCloud Gateway网关快速入门
spring·spring cloud·gateway
泽济天下5 天前
【工作记录】Kong Gateway入门篇之简介
gateway·kong
SHUIPING_YANG5 天前
Nginx 返回 504 状态码表示 网关超时(Gateway Timeout)原因排查
运维·nginx·gateway
Volunteer Technology6 天前
SpringCloud Gateway知识点整理和全局过滤器实现
spring·spring cloud·gateway
matrixlzp6 天前
K8S Gateway AB测试、蓝绿发布、金丝雀(灰度)发布
kubernetes·gateway·ab测试
泽济天下8 天前
【工作记录】Kong Gateway 入门篇之部署及简单测试
gateway·kong
JAVA坚守者8 天前
API 网关核心功能解析:负载均衡、容灾、削峰降级原理与实战摘要
gateway·负载均衡·微服务架构·容灾备份·api 网关·削峰降级·云原生技术
大G哥10 天前
实战演练:用 AWS Lambda 和 API Gateway 构建你的第一个 Serverless API
云原生·serverless·云计算·gateway·aws