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,代码如下
帮忙看看是什么问题?
SpringBoot启动报如下错误,搜半天不知道头绪
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-
3条回答 默认 最新
- 奋斗的小杨 2019-06-27 14:31关注
spring-web看下这个包有没有,没有加上有的话换下版本
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报