spring配置Bean

class HelloWorld{ message; } 在bean.xml中配置 获取bean ApplicationContext context=new ClassXmlApplicationContext("beans.xml"); HelloWorld helloworld=(HelloWorld)context.getBean("helloBean"); 然后就可以使用该对象了。 在类中List holidays; ....
原文地址:https://www.cnblogs.com/macula7/p/1960457.html