1、首先手动加载Spring配置文件有两个类,分别是ClassPathXmlApplicationFileSystemXmlApplicationContext;两个类的区别。

2、然后就是“classpath:” 是可以缺省的。如果是绝对路径,就需要加上 “file:” 前缀,注意的是不可缺省FileSystemXmlApplicationContext的。

3、最后就是通过 @PropertySource 注解,这时候就是实现配置文件加载用法示例:在java类文件中使用 PropertySource 即可。
