Spring 依赖注入(hint: specify index and/or type arguments for simple parameters to avoid type ambiguiti)
来源:互联网 发布:如何成为淘宝主播 编辑:程序博客网 时间:2024/06/01 07:48
<bean id="feeCodeSogouConfig"
class="com.sech.zengzhi.service.config.FeeCodeSogouConfig">
<constructor-arg>
<ref bean="userService" />
<ref local="searchDataService" />
</property>
<property name="sysConfig">
<ref local="sysConfig" />
</property>
class="com.sech.zengzhi.service.config.FeeCodeSogouConfig">
<constructor-arg>
<ref bean="userService" />
</constructor-arg>
<constructor-arg>
<ref bean="advertisingService" />
</constructor-arg>
<ref local="searchDataService" />
</property>
<property name="sysConfig">
<ref local="sysConfig" />
</property>
</bean>
错误信息:16:37:18,109 ERROR ContextLoader:205 - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'feeCodeSogouConfig'
defined in ServletContext resource [/WEB-INF/applicationContext.xml]: 2 constructor arguments specified but no
matching constructor found in bean 'feeCodeSogouConfig'
(hint: specify index and/or type arguments for simple parameters to avoid type ambiguities)
原因是
构造函数写错了..注入的时候找不到构造函数public FeeCodeSogouConfig(UserService userService,AdvertisingService advertisingService) {logger.debug("initializes....");this.userService = userService;this.advertisingService=advertisingService;this.loadUserCodes();}
加上红色的问题解决
- Spring 依赖注入(hint: specify index and/or type arguments for simple parameters to avoid type ambiguiti)
- hint: specify index/type/name arguments for simple parameters to avoid type ambiguities
- Could not resolve matching constructor (hint: specify index/type/name arguments for simple parameter
- Could not resolve matching constructor (hint: specify index/type/name arguments for simple paramet
- Could not resolve matching constructor (hint: specify index/type/name arguments for simple parameter
- Could not resolve matching constructor (hint: specify index/type/name arguments for simple parameter
- Why C++ Supports both Class and Typename for Type Parameters
- Why C++ Supports both Class and Typename for Type Parameters
- Why C++ Supports both Class and Typename for Type Parameters
- Method Parameters And Type Conversion
- 解决Undefined function or method 'vgg_kmiter' for input arguments of type 'double'.
- Undefined function or method 'deploywhich' for input arguments of type 'char'
- Undefined function or method ' ' for input arguments of type 'double' ---错误解决办法
- 解决Undefined function or method 'vgg_kmiter' for input arguments of type 'double'.
- Cannot infer type arguments for PageImpl<>
- Undefined function 'conv2' for input arguments of type 'double' and attributes 'full 3d complex'.
- Undefined function 'conv2' for input arguments of type 'double' and attributes 'full 3d real'.
- grep specify file type
- javascript onerror 错误
- 数组
- TM Forum的TAM中文架构图
- 关于 viewDidAppear 和 viewDidUnAppear
- 母亲节快乐
- Spring 依赖注入(hint: specify index and/or type arguments for simple parameters to avoid type ambiguiti)
- .NET之 Extjs4.0 Grid分页显示
- 【无涯契】【二】
- 关于hbase的read操作的深入研究 region到storefile过程
- 再谈IE6之Fixed定位-----------------------本人已测
- 神奇的数学:牛津教授给青少年的讲座
- 利用Solid Converter PDF提取并重用PDF中的图像
- shell中单引号、双引号、反引号的区别(转自互联网)
- 模版的特化与偏特化