随笔分类 - mybatis
摘要:maven 将runtime注释掉,不然会报错找不到我们要用的PGObject类 <dependency> <groupId>org.postgresql</groupId> <artifactId>postgresql</artifactId> <!-- <scope>runtime</scope
阅读全文
摘要:参数替换 dao层的参数,是如何传入到xml中的sql语句的呢? map传递 dao层接口参数为map,xml中可以直接通过map中的key,来绑定参数 假设传入的参数为两个,uname, password public User selectUser(Map paramMap); 对应的xml为
阅读全文
摘要:标签结构 xml中,一般常见的写法如下 <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" > selext * from xxx where ... </select>
阅读全文