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.建议微服务项目,不要使用那么多层级的父子工程嵌套和集成,否则很容易出现这种问题,耦合度太高了
相关推荐
mashirro2 天前
gateway服启动输出台显示
gateway
豆瓣鸡3 天前
网关、服务 userId 透传
java·微服务·gateway
Sean‘10 天前
GitLab 升级后 502:Puma 反复重启问题处理记录
docker·gateway·gitlab
Hadoop_Liang1 个月前
使用Kubernetes Gateway API实现域名访问应用
容器·kubernetes·gateway
worilb1 个月前
Spring Cloud 学习与实践(9):Gateway + JWT 统一鉴权
学习·spring cloud·gateway
Dontla1 个月前
Kong Gateway(OSS)(Open Source Software)与 Kong Gateway(Enterprise)区别
gateway·kong
yxl874646461 个月前
磐创PCTG-9013 Modbus转ProfibusDP工业协议转换器
网络·科技·物联网·gateway·信息与通信
__log1 个月前
401鉴权问题完全指南:从“门卫拦人“到“畅通无阻“
gateway
暗夜猎手-大魔王1 个月前
hermes源码学习8--Gateway 内部机制
人工智能·gateway
JJJennie7771 个月前
从苹果 2026 落地场景,看系统级 Agent 时代的隐私边界与 MAI Gateway 的企业Token治理
人工智能·gateway·apple