![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
MyBatis框架
xsc699675
这个作者很懒,什么都没留下…
展开
-
Mybatis关联查询
select配置:<select <!-- 1. id (必须配置) id是命名空间中的唯一标识符,可被用来代表这条语句。 一个命名空间(namespace) 对应一个dao接口, 这个id也应该对应dao里面的某个方法(相当于方法的实现),因此id 应该与方法名一致 --> id="select转载 2015-07-26 16:56:58 · 652 阅读 · 0 评论 -
Mybatis 批量操作
批量更新:update id="update" parameterType="java.util.List"> foreach collection="list" item="item" index="index" open="begin" close=";end;" separator=";" > update 表名 s原创 2015-07-29 11:13:48 · 398 阅读 · 0 评论 -
Mybatis动态Sql
1. if: 你们能判断,我也能判断!作为程序猿,谁不懂 if ! 在mybatis中也能用 if 啦: select * from user where id=#{id} and deleteFlag=0;上面例子: 如果传入的id原创 2015-07-26 17:00:07 · 315 阅读 · 0 评论 -
mybatis自动生成实体类和配制文件
需求:执行语句:java -jar mybatis-generator-core-1.3.2.jar -configfile generator.xml -overwritegeterator配置文件: -->(suppressAllComments*阻止**生成注释)(driverClass:访问数据库的JDBC原创 2015-08-13 10:48:04 · 1454 阅读 · 0 评论 -
ssm整合配置
Struts2 struts.xml"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN""http://struts.apache.org/dtds/struts-2.3.dtd">原创 2016-01-05 11:52:07 · 653 阅读 · 0 评论