mybatis配置之properties
这玩意每次创建它我都要创建一个普通的file,然后再自己写后缀名。。。
因为我找不到他对应的文件格式。
流程
1.编写一个配置文件
db.properties
driver=com.mysql.cj.jdbc.Driver
url=jdbc:mysql://localhost:3306/mybatis?userSSL=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC
username=root
password=root
2.配置文件引入
<!--引用外部配置文件-->
<properties resource="db.properties">
<property name="username" value="root"/>
<property name="password" value="root"/>
</properties>