ClassPathXmlApplicationContext(String configLocation)

这个大家都知道是用来加载bean的配置文件,不用多说了:)


但是
ClassPathXmlApplicationContext(String[] configLocations, ApplicationContext parent)

这个构造的作用是什么,应用场景是哪些?

想知道有parent时的应用场景是什么?与没有的区别是什么?

是为了避免bean的ID重名?还是为了构造树状结构的bean图?
评论
jellyfish 2007-03-29
This is mainly for cases like ejb, noting that the ejb class loader is the parent classloader for web, so the ebj ac is a parent of web ac.
YuLimin
  • 浏览: 594747 次
  • 性别: Icon_minigender_1
  • 来自: 福建莆田@广州
  • 详细资料
搜索本博客
我的相册
7b3cc362-5ffb-3f8e-bf39-9e153e30ca74-thumb
力拔千斤
共 146 张
存档
最新评论