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 ...
随机推荐
- tomcat各种问题汇总
1. 让Tomcat支持中文路径名和中文文件名 因为内置get协议中的URL编码都是ISO-8859-1,所以需要我们强制编码,在tomcat/conf/Server.xml中添加URIEncodin ...
- 超链接的那些事(二): 属性href
a标签的属性之一 href 1. 定义 href 属性用于指定超链接目标的 URL. 2. 用法 ①. 锚点 同一页面添加锚点 (1)<a href="#test"& ...
- ubuntu 16.04软件源
来源:模板:16.04source deb http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted universe multive ...
- Open Live Writer的配置
--------siwuxie095 1.首先到官网下载OLW:http://openlivewriter.org/ 2.选择 Other services 3.填写"博客地址". ...
- flash builder4.7bug
flash builder4.7项目,swc中的button实例出来有bug,解决办法: 1,把button都改成movieclip. 2,改用swf做资源.
- python学习笔记-socket
socket socket通常也称作"套接字",用于描述IP地址和端口,是一个通信链的句柄,应用程序通常通过"套接字"向网络发出请求或者应答网络请求. sock ...
- WPF中ListBox的样式设置
设置之后的效果为
- linux 下两台电脑之间ssh无密码连接
例子:在192.168.0.12使用tecmint用户,连接192.168.0.11主机上的sheena用户 Step 1: Create Authentication SSH-Kegen Keys ...
- 使用 IntraWeb (45) - 活用 IntraWeb
asp.net 刚开始时, 也是拖拉控件, 但后来有了 MVC.xNext. 换个思路使用 IntraWeb 吧: 界面全部用 html+js+css 实现(有些会是用 Delphi 动态生成), 然 ...
- 在UTF8(linux)下,逆置汉字字符串
#include <stdio.h> int main() { char c[]="我是如此热爱编程!"; ,min=,max; while(c[index]) { i ...