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 ...
随机推荐
- pip使用
安装指定版本的插件: pip install -v matplotlib==1.5.1 #安装matplotlib version 1.5.1
- C# 生成条形码
原文地址:http://www.cnblogs.com/xcsn/p/4514759.html 引用BarcodeLib.dll(百度云中有)生成条形 protected void Button2_C ...
- 新一代IDE Light Table开源:让编程工作更简单
近日,Light Table项目创始人Chris Granger在其博客上宣布Light Table开源,将代码全部托管在GitHub上,遵循GNU开源许可.与此同时,还发布了0.6版本,该版本添加了 ...
- (转)SqlBulkCopy批量复制数据
在.Net1.1中无论是对于批量插入整个DataTable中的所有数据到数据库中,还是进行不同数据源之间的迁移,都不是很方便.而 在.Net2.0中,SQLClient命名空间下增加了几个新类帮助我们 ...
- python-->基础-->002-->input & raw_input
一.input与raw_input的区别 1.raw_input()说明 a = raw_input("input content:")print a,type(a) 输出结果: ...
- 2015/09/09夜晚js继续学习
单词:标量(scalar)数组(array)元素(element)填充(populating)下标(index) 向数组中添加元素的操作称之填充.在填充数组时,不仅需要给出新元素的值,还需要给新元素在 ...
- ICMP
(一)ICMP IP是一个尽力的不可靠的协议,IP不能提供差错控制(如果数据在传播过程中出现错误了),这个时候ICMP就起作用了. ICMP提供两个功能:差错的报告,查询. ICMP的ICMP包分为两 ...
- 本地Mac如何搭建IPv6环境
http://blog.csdn.net/dancen/article/details/51595374 这篇文章写的很详细,借鉴用啦-
- Frogger
Freddy Frog is sitting on a stone in the middle of a lake. Suddenly he notices Fiona Frog who is sit ...
- 《UML大战需求分析》阅读笔记3
流程分析利器--活动图 活动图属于行为建模的一种.用来分析的不是系统中的某个属性,而是系统或是其中某个部分的活动.结构建模表达的是静态内容,行为建模表达的是动态内容. 在介绍活动图之前,先介绍一下行为 ...