摘要: 一、获取mapper代理对象 DefaultSqlSession.getMapper(Class type) public <T> T getMapper(Class<T> type) { return configuration.getMapper(type, this); } Configura 阅读全文
posted @ 2022-11-27 19:46 shigp1 阅读(653) 评论(0) 推荐(0)
摘要: 一、构建SqlSessionFactory SqlSessionFactoryBuilder.build(InputStream inputStream, String environment, Properties properties) public SqlSessionFactory buil 阅读全文
posted @ 2022-11-27 15:11 shigp1 阅读(497) 评论(0) 推荐(0)
摘要: MyTest.java @Test public void test() { String resource = "mybatis-config.xml"; InputStream inputStream = null; try { inputStream = Resources.getResour 阅读全文
posted @ 2022-11-27 10:12 shigp1 阅读(59) 评论(0) 推荐(0)