spring 通过指定配置文件的URL来读取自定的配置文件:
ctx = new ClassPathXmlApplicationContext("/myspring.xml");
读取默认的配置文件:
ctx = new ClassPathXmlApplicationContext();
hibernaete读取默认的配置文件:
conf = new Configuration().configure()
configure() 没有带任何参数。
但实际可以发现 configure 方法是多态的,它还有如下形式。
configure(java.lang.String);
configure(java.net.URL);
configure(java.io.File);
configure(org.w3c.dom.Document)