梓隽 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条)

报告相同问题?

悬赏问题

  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料