哪位大佬遇到了这个问题关电脑的时候都还好好的,第二天打开就这样了实在解决不了了,百度找遍了都不合适
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
首先检查一下spring-web包的依赖,依赖是否有冲突,然后再重新导入依赖包
类要加上注解。
大概率是你的service类没加注解引起的。
看下ProductFeignService这个service是不是又问题
spingboot对注解很严格的,你是不是没有写注解,service层 有没有写注解@Service