Spring的xml文件中调用bean类的静态方法(factory-method)时,遇到error:Error creating bean with name ‘student1’ defined in class path resource [application.xml]: Invalid factory method ‘quiet’: needs to have a non-void return type!
Error creating bean with name ‘xxx‘ defined in class path resource [application.xml]: Invalid f
Spring的xml文件中调用bean类的静态方法(factory-method)时,遇到error:Error creating bean with name ‘student1’ defined in class path resource [application.xml]: Invalid factory method ‘quiet’: needs to have a non-void return type!解决方法:静态方法的返回类型不能为空(void)类型,为静态方法加上一个返回类型即可。