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.建议微服务项目,不要使用那么多层级的父子工程嵌套和集成,否则很容易出现这种问题,耦合度太高了
相关推荐
whz-emm13 小时前
vLLM加载lora
gateway
青衫客362 天前
Portkey-AI gateway 的一次“假压缩头”翻车的完整排障记:由 httpx 解压异常引发的根因分析
大模型·llm·gateway·httpx
PXM的算法星球7 天前
spring gateway配合nacos实现负载均衡
spring·gateway·负载均衡
1990_super8 天前
使用ceph-deploy安装和配置RADOS Gateway (RGW)并使用S3访问集群
ceph·gateway
北极糊的狐11 天前
接口返回504 Gateway Time-out 错误,这意味着请求在网关或代理服务器等待上游服务器响应时超时。以下是可能的原因和排查建议:
数据库·gateway
sg_knight11 天前
Spring Cloud Gateway全栈实践:动态路由能力与WebFlux深度整合
java·spring boot·网关·spring·spring cloud·微服务·gateway
放纵日放纵14 天前
微服务—Gateway
微服务·架构·gateway
你我约定有三14 天前
分布式微服务--GateWay(1)
java·开发语言·分布式·微服务·架构·gateway
William一直在路上17 天前
KONG API Gateway中的核心概念
网络·gateway·kong