摘要:
MyBatis的Dao层实现方式 一、传统开发方式 1. 编写UserDao接口 public interface UserMapper { List<User> findAll() throws IOException; } 2. 编写UserDaoImpl实现 public class User 阅读全文
摘要:
一、SqlSession工厂构建器SqlSessionFactoryBuilder 常用API:SqlSessionFactory build(InputStream inputStream) 通过加载mybatis的核心文件的输入流的形式构建一个SqlSessionFactory对象 其中,Res 阅读全文
摘要:
一、MyBatis的插入数据操作 1. 编写UserMapper映射文件 <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://myba 阅读全文