• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

gateway和spring mvc冲突

武飞扬头像
wh柒八九
帮助1

在使用gateway和springboot进行整合的时候,出现了jar包冲突的问题。


冲突现场

在使用gateway的时候出现下面错误

学新通


原因分析

Spring MVC found on classpath, which is incompatible with Spring Cloud Gateway.

大致的意识是springmvc 和spring cloud gate way中的依赖相冲突,无法创建bean,导致spring容器启动失败。

这样一个错误,经过网上和官网查找原因是因为spring cloud gateway 是建立在spring boot 2.x 和 spring webflux基础上的既:gateway 本身已经包含了spring mvc 的功能,正与提示的一样和spring boot 的web starter冲突了。

错误出现原因

学新通


如何解决

如何解决

学新通

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /boutique/detail/tanhfjagcg
系列文章
更多 icon
同类精品
更多 icon
继续加载