paip . 解决spring No unique bean of type [com.mijie.homi.search.service.index.MoodUserIndexService]
paip . 解决spring No unique bean of type [com.mijie.homi.search.service.index.MoodUserIndexService] is defined: expected single matching bean but found 2: [moodUserIndexService, searchResultProser]
作者Attilax 艾龙, EMAIL:1466519819@qq.com
来源:attilax的专栏
地址:http://blog.csdn.net/attilax
moodUserIndexService>>>> searchResultProser >>>>searchResultProserxxxx
所有的类都无需致命,全部@Component
使用基类的时候..必须指定beanid..
@Autowired @Qualifier("moodUserIndexService")
private MoodUserIndexService moodUserService;
或者。
@Resource (name="moodUserIndexService")
MoodUserIndexService matchService;
spring No unique bean of type 基类 子类
spring的自动装配(default-autowire="byName") 也不行。。。要是加了子类,必须修改调用父class的
code..应该是spring的一个bug...
paip . 解决spring No unique bean of type [com.mijie.homi.search.service.index.MoodUserIndexService]的更多相关文章
- spring exception--No unique bean of type
今天碰到一个问题,就是我现有项目需要加一个定时器任务,我的代码如下: <!-- 每日数据同步 总数监测任务******************begin --> <bean id=& ...
- Spring Error : No unique bean of type [org.apache.ibatis.session.SqlSessionFactory] is defined
报错信息: Injection of autowired dependencies failed; nested exception is org.springframework.beans.fa ...
- No qualifying bean of type 'com.chinanums.agent.operation.service.component.OperationPageComponent' available:
java.lang.IllegalStateException: Failed to load ApplicationContext at org.springframework.test.conte ...
- No unique bean of type..... Unsatisfied dependency of type
比如在XXXServiceImpl里面写了aa()方法给别的地方调用 但是自己又调用了自己 在开头写了 @Autowired Private XXX xxx; xxx.aa(); 这样重复调用自己的b ...
- No unique bean of type [net.shougongfang.action.paymoney.AlipayPayMoneyReturnObj] is defined: Unsat
0 你把@Service放到实现类上吧.这个问题好像不止一个人在问啦 2013年10月25日 10:34 shidan66 30 0 1 1 加入评论 00 1,@service放到实现上 2. ...
- Spring @Configuration 和 @Bean 注解
@Configuration 和 @Bean 注解 带有 @Configuration 的注解类表示这个类可以使用 Spring IoC 容器作为 bean 定义的来源.@Bean 注解告诉 Spri ...
- [zhuanzai]Bean对象注入失败 .NoSuchBeanDefinitionException: No qualifying bean of type..
nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying b ...
- Spring Boot:Consider defining a bean of type '*.*.*' in your configuration解决方案
果然不看教程直接使用在遇到问题会懵逼,连解决问题都得搜半天还不一定能帮你解决了... ***************************APPLICATION FAILED TO START*** ...
- 关于spring boot自动注入出现Consider defining a bean of type 'xxx' in your configuration问题解决方案
搭建完spring boot的demo后自然要实现自动注入来体现spring ioc的便利了,但是我在实施过程中出现了这么一个问题,见下面,这里找到解决办法记录下来,供遇到同样的问题的同僚参考 Des ...
随机推荐
- POJ 2502 - Subway Dijkstra堆优化试水
做这道题的动机就是想练习一下堆的应用,顺便补一下好久没看的图论算法. Dijkstra算法概述 //从0出发的单源最短路 dis[][] = {INF} ReadMap(dis); for i = 0 ...
- 通过底层AVR方法实现SPI数据传输
主机端: /********************************* 代码功能:通过底层AVR方法实现SPI数据传输(主机端) 创作时间:2016*10*17 使用资源: 更低阶的 aTme ...
- Ubuntu下配置和使用github
一.配置github环境 1.环境:Ubuntu14.04 2.申请github账号 3.安装配置git服务器: (1)安装ssh:sudo apt-get install openssh-serve ...
- boxes
boxes [英][bɒksɪz][美][bɑ:ksɪz] n.盒( box的名词复数 ); 一盒; 电视; 小亭; v.把…装入盒[箱,匣]中( box的第三人称单数 ); 拳击; 以上结果来自 ...
- Delphi inline编译器优化问题
function Test():Integer; inline; var P:Pointer; begin FreeMem(P); Result := AtomicIncrement(__gr); / ...
- 使用GITHUB的体会
github的网页链接 https://github.com/zhangji123/test 学习总结 通过学习使用github软件使我掌握了其使用方法及其独特之处 1.github的网址: htt ...
- cocos2d-x源码分析(1)
class CC_DLL CCCopying { public: virtual CCObject* copyWithZone(CCZone* pZone); }; class CC_DLL CCZo ...
- android studio view.setId报错
自定义控件设置id的时候会报错,如:view.setId(100); 解决方法: 方案一:通过调用View.generateViewId()作为setId的参数,但此方案不是最佳方案,因为View.g ...
- msyql 数据库恢复相关
通过bin日志恢复数据 一.通过bin日志生成 sql #/usr/local/mysql/bin/mysqlbinlog -d dbname --base64-output=DECODE-ROWS ...
- 网页中插入swf动画(embed)
网页中插入swf动画(embed:[ɪm'bed]) 例题: <embed src="swf.sef" width="200" height=" ...