spring 启动
ClassPathXMLApplicationContext context = new ClassPathXMLApplicationContext();
context.setConfigLocation("");//xml启动路径
context.refresh();
class MyContext extends ClassPathXMLApplicationContext {
public MyContext(){
this.setConfigLocation("");
this.refresh();
}
}
bean 加载顺序
先加载xml中 ,然后加载@Bean
Aware
获取spring容器启动的内部框架数据,需要继承其子实现类