spring引入属性文件

   p:location="classpath:com/xx/x/jdbc.properties"

   p:fileEncoding="utf-8"/>


如果需要配置编码不可以直接设置file-encoding="uft-8", 会报错!!!

正确配置如下:


   


   file-encoding="utf8"/>

**在属性文件中如果属性值 太长 ,  可以在行后添加"\"分行

例如:在jdbc.properties中

password=a123456789qewrryurtyi\

sdfsnsgsvgertneesrteshsdtertsdgae


你可能感兴趣的:(spring引入属性文件)