Spring中查看加载配置文件中 加载类的个数及详情

断点到:

org.springframework.beans.factory.support.DefaultListableBeanFactory#getBeanDefinitionCount

显示该配置文件加载个数日志:

DEBUG o.s.b.f.xml.XmlBeanDefinitionReader - Loaded 32 bean definitions from location pattern [classpath:ApplicationContext.xml]

之所以会相差四个,是因为减去之前加载类:

org.springframework.beans.factory.xml.XmlBeanDefinitionReader#registerBeanDefinitions:509

扫描二维码关注公众号,回复: 6164211 查看本文章

猜你喜欢

转载自www.cnblogs.com/hfultrastrong/p/10831514.html