文档章节

Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: pri...

o
 osc_fmg49rzg
发布于 2019/03/21 16:44
字数 437
阅读 6
收藏 0

精选30+云产品,助力企业轻松上云!>>>

2019-03-19 16:22:14,945 WARN [main] (org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:486))- Exception encountered during context initialization - cancelling refresh attempt
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bankService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.******.seashell.bpc.query.query.service.FscBankPayCodeQueryService com.******.dolphin.service.bank.BankService.fscBankPayCodeQueryService; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.******.seashell.bpc.query.query.service.FscBankPayCodeQueryService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:298) ~[spring-beans.jar:3.2.13.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1148) ~[spring-beans.jar:3.2.13.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) ~[spring-beans.jar:3.2.13.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458) ~[spring-beans.jar:3.2.13.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293) ~[spring-beans.jar:3.2.13.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223) ~[spring-beans.jar:3.2.13.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290) ~[spring-beans.jar:3.2.13.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191) ~[spring-beans.jar:3.2.13.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:636) ~[spring-beans.jar:3.2.13.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:934) ~[spring-context.jar:3.2.13.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479) ~[spring-context.jar:3.2.13.RELEASE]
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:410) ~[spring-web.jar:3.2.13.RELEASE]
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306) ~[spring-web.jar:3.2.13.RELEASE]
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112) ~[spring-web.jar:3.2.13.RELEASE]
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206) ~[catalina.jar:6.0.35]
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705) ~[catalina.jar:6.0.35]
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057) ~[catalina.jar:6.0.35]
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840) ~[catalina.jar:6.0.35]
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057) ~[catalina.jar:6.0.35]
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463) ~[catalina.jar:6.0.35]
at org.apache.catalina.core.StandardService.start(StandardService.java:525) ~[catalina.jar:6.0.35]
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754) ~[catalina.jar:6.0.35]
at org.apache.catalina.startup.Catalina.start(Catalina.java:595) ~[catalina.jar:6.0.35]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_80]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_80]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_80]
at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_80]
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) ~[bootstrap.jar:6.0.35]
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) ~[bootstrap.jar:6.0.35]
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.******.seashell.bpc.query.query.service.FscBankPayCodeQueryService com.******.dolphin.service.bank.BankService.fscBankPayCodeQueryService; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.******.seashell.bpc.query.query.service.FscBankPayCodeQueryService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:531) ~[spring-beans.jar:3.2.13.RELEASE]
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88) ~[spring-beans.jar:3.2.13.RELEASE]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:295) ~[spring-beans.jar:3.2.13.RELEASE]
... 28 more
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.******.seashell.bpc.query.query.service.FscBankPayCodeQueryService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoSuchBeanDefinitionException(DefaultListableBeanFactory.java:997) ~[spring-beans.jar:3.2.13.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:867) ~[spring-beans.jar:3.2.13.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:779) ~[spring-beans.jar:3.2.13.RELEASE]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:503) ~[spring-beans.jar:3.2.13.RELEASE]
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88) ~[spring-beans.jar:3.2.13.RELEASE]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:295) ~[spring-beans.jar:3.2.13.RELEASE]
... 28 more

 

原因:bean没有被加载进去

在xml中加载进去即可。

o
粉丝 0
博文 500
码字总数 0
作品 0
私信 提问
加载中
请先登录后再评论。
jeesite oracle数据库转成mysql问题

@ThinkGem 你好,想跟你请教个问题:16年7月份左右用的你的框架,当前是从mysql转换成oracled的,目前我Oracle再转换成mysql 启动报错,一直不知道什么原因,请教您一下原因,谢谢 Caused b...

sevenei
2018/10/29
164
0
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'catch...

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'catchFromPBomService': Cannot create inner bean '(inner bean)#302efb82' of type [com.thin......

osc_y7ckpzr9
2019/04/27
25
0
@Autowired 这个注解则么用,需要倒包么,配置文件需要写什么。

为什么我用了之后报错 16:46:22,706 ERROR localhost-startStop-1 context.ContextLoader:319 - Context initialization failed org.springframework.beans.factory.BeanCreationException: ......

79043076
2016/01/18
3.7K
1
tomcat启动报错

最近公司员工离职新来的情况比较泛滥导致代码的质量都下降了,,我只是更新了一下就这样了除了回复版本还有什么别的方法吗,到底是哪里出的错,是别人代码的事情还是我的配置问题???? 严...

iFlyS
2015/07/23
1.5K
4
java tomcat

tomcat 启动一直报错,找不到问题,svn 拉取的代码,大神们帮忙看看 五月 24, 2018 3:17:53 下午 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application...

RedZhou
2018/05/24
186
1

没有更多内容

加载失败,请刷新页面

加载更多

Eclipse_JavaEE_Tomcat_MySQL环境配置

安装java环境,配置系统变量(JAVA_HOME,绝对路径) 下载eclipse+Tomcat+mysql window——》preference——》server——》runtime——》tomcat环境 项目右键build path 配mysql jar ,libra...

愿有时光可回首
今天
24
0
MySQL原理 - InnoDB引擎 - 行记录存储 - Redundant行格式

本文基于 MySQL 8 在上一篇:MySQL原理 - InnoDB引擎 - 行记录存储 - Compact格式 中,我们介绍了什么是 InnoDB 行记录存储以及 Compact 行格式,在这一篇中,我们继续介绍其他三种行格式。 ...

zhxhash
今天
29
0
leetcode面试题 17.13(恢复空格)--Java语言实现

求: 哦,不!你不小心把一个长篇文章中的空格、标点都删掉了,并且大写也弄成了小写。像句子"I reset the computer. It still didn’t boot!"已经变成了"iresetthecomputeritstilldidntboo...

拓拔北海
今天
19
0
B站跨年晚会究竟做对了什么?

燃财经(ID:rancaijing)原创 作者 | 赵磊 编辑 | 周昶帆 “补课”是《bilibili晚会 二零一九最美的夜》这个视频中,观众在前两分钟刷得最多的弹幕,寓意着观众是在元旦之后回来补看跨年晚会...

子乾建建_Jeff
01/07
63
0
关于Scrapy爬虫项目运行和调试的小技巧(上篇)

点击上方“Python爬虫与数据挖掘”,进行关注 回复“书籍”即可获赠Python从入门到进阶共10本电子书 今 日 鸡 汤 迟日江山丽,春风花草香。泥融飞燕子,沙暖睡鸳鸯。 扫除运行Scrapy爬虫程序...

yuhan336
04/02
26
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部