Spring 转载配置文件的三种方式
1.ClassPathXmlApplicationContext:从类路径中加载。
2.FileSystemXmlApplicationContext:从文件系统中加载。
3.XmlWebApplicationContext:从web系统中加载。
applicationContext 会 在【启动】后,预载入所有【单例】bean,其他则延迟加载。
<bean id="" class="" scope="singleton|prototype">
...
</bean>
singleton : 单例(默认)。
prototype: 原型,每次 getBean 都相当于 new 一个。