本Mybatis课堂记录根据 b站视频公开视频 【狂神说Java】Mybatis最新完整教程IDEA版通俗易懂 边学边做的笔记,有部分为自己的理解。
如有不同,一切以视频为准
查看笔记点击此处
缺少mybatis-config.xml
文件
下载使用需要重命名 mybatis-config.default.xml
文件为 mybatis-config.xml
, 同时将里面的参数改成自己的数据库连接
设置连接时建议增加 useSSL=false&useUnicode=true&characterEncoding=UTF-8
参数
缺少db.properties
文件
需要添加 db.properties
文件,内容如下
driver=com.mysql.cj.jdbc.Driver
url=jdbc:mysql://127.0.0.1:3306/mybatis?useSSL=false&useUnicode=true&characterEncoding=UTF-8
username=root
password=123456