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
 

猜你喜欢

转载自www.cnblogs.com/mobies/p/11870134.html
今日推荐