spring通过xml方式加载properties文件

<context:property-placeholder location=""/>标签,可以用来加载properties配置文件

 

<context:property-placeholder location="classpath:config/db.properties"/>

 

 




db.user=root
db.password=111111
db.driver=com.mysql.cj.jdbc.Driver
db.url=jdbc:mysql://localhost:3306/testlogin?serverTimezone=GMT%2B8
 
posted @ 2019-11-15 23:23  牧阳人  阅读(1107)  评论(0编辑  收藏  举报