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.建议微服务项目,不要使用那么多层级的父子工程嵌套和集成,否则很容易出现这种问题,耦合度太高了
相关推荐
serendipity_hky3 天前
【SpringCloud | 第4篇】Gateway网关统一入口
spring·spring cloud·微服务·gateway
库库林_沙琪马3 天前
4、Gateway
gateway
全靠bug跑3 天前
Spring Cloud Gateway 实战:统一鉴权与用户信息全链路透传
java·开发语言·gateway·拦截器
骚戴4 天前
架构设计之道:构建高可用的大语言模型(LLM) Enterprise GenAI Gateway
java·人工智能·架构·大模型·gateway·api
Maiko Star6 天前
Gateway网关拦截自定义header & 用户上下文打通实战
gateway·threadlocal
skywalk81639 天前
LLM API Gateway:使用Comate Spec Mode创建大模型调用中转服务器
服务器·人工智能·gateway·comate
我是小妖怪,潇洒又自在9 天前
springcloud alibaba(七)Gateway--服务网关
spring·spring cloud·gateway
boy快快长大12 天前
【Spring Cloud Alibaba】Gateway(一)
数据库·gateway
谷隐凡二13 天前
网关的核心概念及简单演进介绍
gateway