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 ...
随机推荐
- Open Live Writer的配置
--------siwuxie095 1.首先到官网下载OLW:http://openlivewriter.org/ 2.选择 Other services 3.填写"博客地址". ...
- 附10 kibana创建新的index patterns
elk整体架构图: 一.logstash indexer 配置文件: input { stdin{} } filter { } output { elasticsearch { hosts => ...
- Android AppWidget
AppWidget不知道大家使用这个多不多,这个在手机上也叫做挂件,挂件也就是放在桌面方便用户进行使用的,从android1.6开始挂件支持一些简单的lauout和view,到了android4.0之 ...
- [Chapter 3 Process]Practice 3.5 When a process creates a new process using the fork() operation
3.5 When a process creates a new process using the fork() operation, which of the following state is ...
- MVC_Ajax请求
MVC_Ajax请求MVC中的AJAX操作原理还是基于Jquery的封装操作.但是吧没有那么恐怖.Ajax.BeginForm:使用Ajax.BeginForm方法会生成一个form表单,最后以Aja ...
- 如何在子线程中使用Toast和更新UI
因为没一个Looper处理消息循环,所以子线程中无法使用Toast 方法: Looper.prepare(); Toast.makeText(getActivity(),"刷到底啦" ...
- 什么是领域驱动设计(Domain Driven Design)?
本文是从 What is Domain Driven Design? 这篇文章翻译而来. ”…在很多领域,专家的作用体现在他们的专业知识上而不是智力上.“ -- Don Reinertsen 领域驱动 ...
- win7连接共享打印机 错误为
1. xp局域网共享打印机,本机运行 –> \\共享电脑ip –> 选择驱动目录 .INF 文件 –> 确认. 直接报错..... 2. 参考方法: 开始——设备和打印机——添 ...
- mybatis异常
一.Invalid bound statement 1.mapper.xml中namespaces错误(***) 2.方法不存在 3.方法返回值错误 二.Mapped Statements colle ...
- fancybox iframe 刷新父页面(项目经验)
<script type="text/javascript"> $(document).ready(function() { $(".fancybox&quo ...