//@ContextConfiguration(locations = { "classpath*:/spring1.xml", "classpath*:/spring2.xml" })
public class TimerTest {
@Test
public void testTimeRun(){
String[] str = new String[]{"service.context.xml","schedule.context.xml","actions.context.xml"};
ApplicationContext con = new ClassPathXmlApplicationContext(str);
SystemDao systemDao = (SystemDao) con.getBean("systemDao");
System.out.println(systemDao);
}
}
spring加载多个配置文件
原创
©著作权归作者所有:来自51CTO博客作者mb648972af0d702的原创作品,请联系作者获取转载授权,否则将追究法律责任
上一篇:liunx日志内容提取
下一篇:获取当前正在执行的类名 和方法
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
Spring Boot 3中使用Jasypt实现配置文件信息加密
Spring Boot 3中使用Jasypt实现配置文件信息加密
spring bash 配置文件