spring cloud gateway做网关遇见500问题和404
This application has no explicit mapping for /error, so you are seeing this as a fallback.Tue Jan 22 15:55:26 CST 2019There was an unexpected error (type=Not Found, status=404).No message availa...
·
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Tue Jan 22 15:55:26 CST 2019
There was an unexpected error (type=Not Found, status=404).
No message available
最终发现是包冲突下面这个包
<!--undertow容器-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-undertow</artifactId>
</dependency>
ps:另外请检查自己的pom和父pom文件是否有多余pom文件,这样也有冲突,还有gateway不能使用web包(一定冲突)
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
最终gataway路由功能仅此需要
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-gateway</artifactId>
<version>2.0.2.RELEASE</version>
</dependency>
这个就行了。其他的例如尤里卡配置中心相对而加就行
个人博客:
名称:纯洁的麦田
链接:http://www.idearyou.cn/
描述:争取哪一天做上架构师
公众号:纯洁的麦田
另外:个人公众号,每天有新java文章,还有中高级面试题分享
更多推荐
已为社区贡献2条内容
所有评论(0)