Springboot:@ImportResource注解 @ImportResource(“classpath:beans.xml”)导入spring配置文件,使配置文件中的组件生效 一、beans.xml文件 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans"