Spring 相关 总结从多个 xml 文件中加载 bean 的几种方法
資深大佬 : gzk329 0
ApplicationContext ctx = new ClassPathXmlApplicationContext("classpath:*conf-*.xml"); //或者 ApplicationContext ctx = new ClassPathXmlApplicationContext("classpath*:a.xml,b.xml"); //或者 ApplicationContext ctx = new ClassPathXmlApplicationContext( new String[] {"services.xml", "daos.xml"}, MessengerService.class); //或者 ApplicationContext ctx = new ClassPathXmlApplicationContext( new String[] {"services.xml", "daos.xml"});
这个第三种是从 MesssengerService.class 的同文件夹下面找,那么这个第四种是什么意思呢?
大佬有話說 (2)