<Bean id = "feeCodeSogouConfig" class = "com. sech. zengzhi. service. config. feeCodeSogouConfig "> <constructor-arg> <ref bean =" userService "/> </constructor-arg> <ref bean =" advertisingService "/> </constructor -arg> <property name = "searchDataService"> <ref local = "searchDataService"/> </property> <property name = "sysConfig"> <ref local = "sysConfig "/> </property> </bean> error message: 16: 37: 18,109 ERROR ContextLoader: 205-Context initialization failedorg. 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) the reason is that the constructor is wrong .. the constructor public FeeCodeSogouConfig (UserService userService, AdvertisingService advertisingService) {logger. debug ("initializes .... "); this. userService = userService; this. advertisingService = advertisingService; this. loadUserCodes ();} solve the problem with red