代码如下(该代码未执行,未在编辑器中编辑,纯粹记录使用):
1
2
3
4
5
6
7
|
// beans.xml
ApplicationContext applicationContext = new ClassPathXmlApplicationContext("beans.xml");
// xxxConfiguration.class
ApplicationContext applicationContext = new AnnotationConfigApplicationContext(xxxConfiguration.class)
|