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

原文地址:https://www.cnblogs.com/hfultrastrong/p/10831514.html