开发者社区> 问答> 正文

tomcat启动报错Error creating bean with name ?报错

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'realNameAuthBusiness': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.zxhy.xjl.rna.business.RealNameAuthConfig com.zxhy.xjl.rna.business.impl.RealNameAuthBusinessImpl.realNameAuthConfig; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'realNameAuthConfig' defined in URL [jar:file:/A:/apache-tomcat-8989/wtpwebapps/xjl-realNameAuth-web/WEB-INF/lib/xjl-realNameAuth-core-0.0.1.jar!/ApplicationContext-rna.xml]: Cannot resolve reference to bean 'false' while setting bean property 'usePeopleIDCheck'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'false' is defined
 at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1214)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
 at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
 at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
 at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
 at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
 at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772)
 at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839)
 at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538)
 at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:444)
 at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:326)
 at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
 at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4811)
 at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5251)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
 at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
 at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
 at java.util.concurrent.FutureTask.run(FutureTask.java:266)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
 at java.lang.Thread.run(Thread.java:745)
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.zxhy.xjl.rna.business.RealNameAuthConfig com.zxhy.xjl.rna.business.impl.RealNameAuthBusinessImpl.realNameAuthConfig; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'realNameAuthConfig' defined in URL [jar:file:/A:/apache-tomcat-8989/wtpwebapps/xjl-realNameAuth-web/WEB-INF/lib/xjl-realNameAuth-core-0.0.1.jar!/ApplicationContext-rna.xml]: Cannot resolve reference to bean 'false' while setting bean property 'usePeopleIDCheck'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'false' is defined
 at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:573)
 at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
 at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331)
 ... 22 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'realNameAuthConfig' defined in URL [jar:file:/A:/apache-tomcat-8989/wtpwebapps/xjl-realNameAuth-web/WEB-INF/lib/xjl-realNameAuth-core-0.0.1.jar!/ApplicationContext-rna.xml]: Cannot resolve reference to bean 'false' while setting bean property 'usePeopleIDCheck'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'false' is defined
 at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:359)
 at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1481)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1226)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
 at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
 at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
 at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
 at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
 at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1192)
 at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1116)
 at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1014)
 at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:545)
 ... 24 more
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'false' is defined
 at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:698)
 at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1175)
 at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:284)
 at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
 at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:351)
 ... 37 more

展开
收起
爱吃鱼的程序员 2020-06-09 15:55:40 1252 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    这个错误的大概是为 realNameAuthBusiness的 usePeopleIDCheck属性赋值时出现错误, 'false'并不是一个bean建议1.将对应的值修改为false试试2.检查 usePeopleIDCheck的set方法是否设置正确。3.如果是jar内代码,建议更新版本。

    这个Bean realNameAuthBusiness 有这个属性吗?? usePeopleIDCheck
    2020-06-09 15:55:56
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
Apache Tomcat 的云原生演进 立即下载
低代码开发师(初级)实战教程 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载