我发现Idea出的问题是真的多,老是出BUG.
今天解决了一天,太生气了,怒写博客!!!
上错误:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'memberProviderHandler': Lookup method resolution failed; nested exception is java.lang.IllegalStateException: Failed to introspect Class [com.zx.crowdfunding.handler.MemberProviderHandler] from ClassLoader [sun.misc.Launcher$AppClassLoader@18b4aac2]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:265) ~[spring-beans-5.1.8.RELEASE.jar:5.1.8.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineConstructorsFromBeanPostProcessors(AbstractAutowireCapableBeanFactory.java:1269) ~[spring-beans-5.1.8.RELEASE.jar:5.1.8.RELEASE]
这个memberProviderHandler中引用的一个自己写的工具类,一直提示classnotfond.
在此之前还有包冲突的问题,总之各种各样的问题,最终到这个问题了就是解决不了。
最后我尝试删除报错的这个类,重新运行项目发现还是报原来的错误!这里我恍然大悟肯定是Idea的问题!!!
解决办法1:
(1)在maven中clean
(2)在项目文件中删除.idea
(3)在maven中install
无效
解决办法2:
重建项目
Build---->Rebuild Project
成功!