Spring加载properties文件

我们之前是把这里面的数据写死了,现在我们把他们写活。

如何在xml里获取properties文件

Spring加载properties文件

我们只需要复制把beans全部换成context就行。

Spring加载properties文件

resources就是类路径,如果在类路径下要加上classpath

Spring加载properties文件

把jdbc.properties的key值,这样就行。

相关文章: