梓隽 2019-06-27 14:23 采纳率: 100%
浏览 1393
已采纳

SpringBoot启动报如下错误,搜半天不知道头绪

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'createRestApi' defined in class path resource [com/uniware/oa_demo/config/Swagger2Config.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [springfox.documentation.spring.web.plugins.Docket]: Factory method 'createRestApi' threw exception; nested exception is java.lang.NoClassDefFoundError: org/springframework/http/MediaType
图片说明
再仓库里面org.springframework下也没找到http.MediaType
然后说是Bean注入失败,我就配了个swageger,代码如下图片说明
帮忙看看是什么问题?

  • 写回答

3条回答

  • 奋斗的小杨 2019-06-27 14:31
    关注

    spring-web看下这个包有没有,没有加上有的话换下版本

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记