Mybatis
simple默
这个作者很懒,什么都没留下…
展开
-
mybatis传递多参数的问题
mybatis多参数传递遇到的异常接口需要加@Param注解void edit(@Param("param1") Integer id, @Param("param2") String eduName);mapper <update id="edit"> update education set eduName=#{param2} where id=#{pa...原创 2018-07-19 10:13:26 · 109 阅读 · 0 评论 -
mybatis的逆向工程
使用mybatis的逆向工程生成对应的bean以 及mapper在pom.xml中添加依赖 <dependency> <groupId>org.mybatis.generator</groupId> <artifactId>mybatis-generator-core</artifactId> ...原创 2018-07-21 19:21:57 · 88 阅读 · 0 评论 -
mybatis批量插入数据
<!-- 配置一个可以执行批量的sqlSession --> <bean id="sqlSession" class="org.mybatis.spring.SqlSessionTemplate"> <constructor-arg name="sqlSessionFactory" ref="sqlSessionFactory">&am原创 2018-07-22 03:22:11 · 243 阅读 · 0 评论 -
mybatis多个动态sql
用where1=1连接多个条件 select c.StartAreaID, a1.level as startLevel, a1.areaName as startName1, a2.areaName as startName2, a3.areaName as startName3, a4.areaName as endName1, a5.are...原创 2018-08-06 09:38:22 · 125 阅读 · 0 评论 -
pageHelper分页插件
在pom.xml中添加依赖 <!--引入pageHelper分页插件 --> <dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelper</artifactId> <ver...原创 2018-09-08 22:55:45 · 135 阅读 · 0 评论