Spring 依赖注入(hint: specify index and/or type arguments for simple parameters to avoid type ambiguiti)

class="com.sech.zengzhi.service.config.FeeCodeSogouConfig">













错误信息: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();
}
加上红色的问题解决

你可能感兴趣的:(问题解决)