当前位置:首页 > 编程语言 > 正文

spring通过xml方式加载properties文件

11-18 编程语言

标签:style   pass   path   span   contex   hold   标签   pre   bsp   

<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+8
 

spring通过xml方式加载properties文件

标签:style   pass   path   span   contex   hold   标签   pre   bsp   

温馨提示: 本文由杰米博客推荐,转载请保留链接: https://www.jmwww.net/file/biancheng/12124.html