spring配置Bean

class HelloWorld{ message; } 在bean.xml中配置 获取bean ApplicationContext context=new ClassXmlApplicationContext("beans.xml"); HelloWorld helloworld=(HelloWorld)context.getBean("helloBean"); 然后就可以使用该对象了。 在类中List holidays; ....
posted @ 2010-04-21 04:27  macula7  阅读(143)  评论(0编辑  收藏  举报