随笔分类 -  mybatis

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

点击右上角即可分享
微信分享提示