spring-cloud-starter-gateway踩坑

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.建议微服务项目,不要使用那么多层级的父子工程嵌套和集成,否则很容易出现这种问题,耦合度太高了

你可能感兴趣的:(gateway)