首页 新闻 会员 周边 捐助

SpringBoot创建bean错误

0
[待解决问题]


哪位大佬遇到了这个问题关电脑的时候都还好好的,第二天打开就这样了实在解决不了了,百度找遍了都不合适

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2021-06-04 22:02:05.600 ERROR 5716 --- [           main] o.s.boot.SpringApplication               : Application run failed

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'purchaseController': Unsatisfied dependency expressed through field 'purchaseService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'purchaseService': Unsatisfied dependency expressed through field 'wareSkuService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'wareSkuService': Unsatisfied dependency expressed through field 'productFeignService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.wzw.gulishop.ware.feign.ProductFeignService': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mvcResourceUrlProvider' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.servlet.resource.ResourceUrlProvider]: Factory method 'mvcResourceUrlProvider' threw exception; nested exception is java.lang.NoSuchFieldError: defaultInstance

Lucky_Boy000的主页 Lucky_Boy000 | 菜鸟二级 | 园豆:202
提问于:2021-06-05 13:06
< >
分享
所有回答(4)
0

首先检查一下spring-web包的依赖,依赖是否有冲突,然后再重新导入依赖包

bigdata-page | 园豆:204 (菜鸟二级) | 2021-06-06 22:17
0

类要加上注解。

mowen285 | 园豆:674 (小虾三级) | 2021-06-08 16:25

大概率是你的service类没加注解引起的。

支持(0) 反对(0) mowen285 | 园豆:674 (小虾三级) | 2021-06-08 16:27
0

看下ProductFeignService这个service是不是又问题

良工说技术 | 园豆:270 (菜鸟二级) | 2021-07-01 11:03
0

spingboot对注解很严格的,你是不是没有写注解,service层 有没有写注解@Service

一个很虎的大坑 | 园豆:202 (菜鸟二级) | 2021-07-16 17:32
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册