创建Bean时,class属性必须指定,此时为静态工厂类. factory-method指定静态工厂方法名. 接口: public interface Being { public void testBeing(); } Dog类 public class Dog implements Being{ private String msg; public void setMsg(String msg) { this.msg = msg; } @Override public void testBe…