原文:ClassPathXmlApplicationContext和FileSystemXmlApplicationContext区别

ClassPathXmlApplicationContext 默认文件路径是src下那一级classpath:和classpath :的区别: classpath: 只能加载一个配置文件,如果配置了多个,则只加载第一个 classpath : 可以加载多个配置文件,如果有多个配置文件,就用这个 FileSystemXmlApplicationContext 这个类,默认获取的是项目路径,默认文件路 ...

2017-04-21 13:11 0 2446 推荐指数:

查看详情

FileSystemXmlApplicationContext方法的绝对路径问题

FileSystemXmlApplicationContext方法准备去容器中取bean,在window环境下没有问题,但是放到Jenkins上面发现总是报错,说文件找不到:   查看源码发现,FileSystemXmlApplicationContext方法对路 ...

Mon Jun 27 19:53:00 CST 2016 0 3874
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM