spring

程序中读取classpath下的文件

通过类org.springframework.core.io.ClassPathResource可以读取到springboot项目的classes目录下的文件 即src/main/resourece/(开发环境下)| project.jar>BOOT-INF>classes(生产环境下)

bean instance location

spring

ClassPathXmlApplicationContext.ClassPathXmlApplicationContext(String[] paths, Class<?> clazz, @Nullable ApplicationContext parent)

AbstractApplicationContext.refresh()

AbstractApplicationContext.obtainFreshBeanFactory()

XmlBeanDefinitionReader.registerBeanDefinitions()