随笔分类 - mybatis
摘要:一. 配置文件 参考: https://www.cnblogs.com/wanthune/p/13674243.html 二. 源码解析 XMLConfigBuilder 就是解析Xml的主类。 public Configuration parse() { if (parsed) { throw n
阅读全文
摘要:解析配置文件 配置mybatis-config.xml <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybati
阅读全文
摘要:Mybatis 启动流程 @Before public void init() throws IOException { String resouce = "mybatis-config.xml"; /** * 读取 mybatis文件,返回的是 InputStream流 */ InputStrea
阅读全文
摘要:参考博文写的很详细,就不在重复写了 参考:https://www.jianshu.com/p/541874714907 注意事项: 如果UserMapper.xml放在java目录下,则maven依赖中必须加上resource <build> <resources> <!-- 这表示加载java目录
阅读全文
摘要:UserInfo.java @Data public class UserInfo implements Serializable { private static final long serialVersionUID = 1L; /** * 数据库字段信息:name_str VARCHAR(20
阅读全文

浙公网安备 33010602011771号