0.#{}与${}区别

#{}实现的是向prepareStatement中的预处理语句中设置参数值,sql语句中#{}表示一个占位符即?。

<!-- 根据id查询用户信息 -->
<select id="findUserById" parameterType="int" resultType="user">
select * from user where id = #{id}
</select>

  

使用占位符#{}可以有效防止sql注入,在使用时不需要关心参数值的类型,mybatis会自动进行java类型和jdbc类型的转换。#{}可以接收简单类型值或pojo属性值,如果parameterType传输单个简单类型值,#{}括号中可以是value或其它名称。

${}和#{}不同,通过${}可以将parameterType 传入的内容拼接在sql中且不进行jdbc类型转换, ${}可以接收简单类型值或pojo属性值,如果parameterType传输单个简单类型值,${}括号中只能是value。使用${}不能防止sql注入,但是有时用${}会非常方便,如下的例子:

<!-- 根据名称模糊查询用户信息 -->
<select id="selectUserByName" parameterType="string" resultType="user">
select * from user where username like '%${value}%'
</select>

  

如果本例子使用#{}则传入的字符串中必须有%号,而%是人为拼接在参数中,显然有点麻烦,如果采用${}在sql中拼接为%的方式则在调用mapper接口传递参数就方便很多。

再比如order by排序,如果将列名通过参数传入sql,根据传的列名进行排序,应该写为:

ORDER BY ${columnName}

如果使用#{}将无法实现此功能。

实际可以这么理解,#{}会在里面加上单引号。${}不会加上单引号。比如:

如果变量的值是:safehatnum

(1)#{}加引号

select * from safehat order by #{order};

相当于

select * from safehat order by 'safehatnum';

(2)${}不加引号

select * from safehat order by ${order};

相当于

select * from safehat order by safehatnum;

--------------------------------parameterType输入类型--------------------

通过parameterType指定输入参数的类型,类型可以是简单类型、hashmap、pojo的包装类型

1     传递简单类型

1.int型

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAwsAAAA6CAIAAABwClJ4AAAPOUlEQVR4nO2dPZKjPBCGOc8egWQusUfY4g6OTDI5CTXRpptQTklduOYMJARbE3MIbcCffrpbAjQ29r5Pub5v1iDRSI300i1wogAAAAAAgEnyaAMAAAAAAA4HFBIAAAAAgA0UEgAAAACADRQSAAAAAIANFBIAAAAAgM29FFJbvZ3Pw+e9vdMxWerqnJzLohd2abPzOQs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B9RJY27ugJYBAEBEoJAAAAAAAGygkAAAAAAAbKCQAAAAAABsoJAAAAAAAGygkAAAAAAAbHYqpL74yNNbv6uOtno7n4fPe7vPHAAAAACAGOxTSO0lyS+RXonSvkdUSG31dq4+I1UGAAAAgP+NAIXU31JGBtWX3QGkhbsopP6W5h9FLJMBAAAA8KL4FFJ7SXJGBkVWG3eKIdWXPMnzDOk8AAAAAPBICqm7fQhiort9JBd721dTzouKbI2irTd6q9xKGYUkler/lPOxzr+a3jHA2GSdV7zoFwAAAABeDVYh1Zc8kUJEbeaKJz5y89WU2qb+T+nKHUIhiaXad1ppeSyZKrulee4qPAAAAAAAxSikvvjIPUuwyTXabcU8j9b/Kc1ADqFgXIUklfpqyrey+WLNC1mp3WZ5nnzc8ONSAAAAALDYFkPiH/Lvm19Ebqt9dzJfAQpJKvVZ8QEkhRgSAAAAAHaxaR1SyBrtvvm1iKSQVdi0QuJKfVbn7TEkYfk5AAAAAMC2Z9nqS0j0xciRmSuK6CP51iFZ1esKjN5Kqis8ywYAAAAALxveh0St0VZKOc+RWfLFfspsypF9Vk4qTUufcaWUMjJ68uGWTXgfEgAAAAACWP1O7e72gdXNAAAAAHht1iqkGD/EBgAAAABwbHb+ci0AAAAAwAvyD2I6yx5k4vklAAAAAElFTkSuQmCC" alt="" />

2.String型

<select id="findUserByName" parameterType="java.lang.String" resultType="cn.itcast.mybatis.po.User">
SELECT * FROM USER WHERE username like '%${value}%'
</select>

2. 传递POJO对象

Mybatis使用ognl表达式解析对象字段的值,如下例子:

   <!-- 更新用户,根据Id更新 ,需要传入Id(int型)与更新信息
parameterType类型为User类型,指定需要修改的用户id和修改后的属性值,#{username}表示从传入的对象中取对应的username属性
#{id}表示从user对象中获取id
-->
<update id="updateUserByTd" parameterType="cn.itcast.mybatis.po.User">
update user set username=#{username},birthday=#{birthday},sex=#{sex},address=#{address}
where id=#{id}
</update>

异常测试:

Sql中字段名输入错误后测试,username输入dusername测试结果报错:

org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'dusername' in 'class cn.itcast.mybatis.po.User'
### Cause: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'dusername' in 'class cn.itcast.mybatis.po.User'

  

Normal
0

7.8 磅
0
2

false
false
false

EN-US
ZH-CN
X-NONE

/* Style Definitions */
table.MsoNormalTable
{mso-style-name:普通表格;
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.5pt;
mso-bidi-font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-font-kerning:1.0pt;}

3. 传递pojo包装对象(传递QueryVo,取值的时候取其属性User对象的属性,相当于取传的对象的属性的属性,只不过对象的属性是对象)

/* Style Definitions */
table.MsoNormalTable
{mso-style-name:普通表格;
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.5pt;
mso-bidi-font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-font-kerning:1.0pt;}

开发中通过pojo传 递查询条件,查询条件是综合的查询条件,不仅包括用户查询条件还包括其它的查询条件(比如将用户购买商品信息也作为查询条件),这时可以使用包装对象传递输入参数。

3.1  定义包装对象

定义包装对象将查询条件(pojo)以类组合的方式包装起来。

aaarticlea/png;base64,iVBORw0KGgoAAA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8TX4tb9yIb92EF63VigYA/bprULy0lnphTRwEqlPFo3ylq5mVYcBlgO2eoV3BgJABeFXq/XarUURSmXy/l8XhAE/cl1f3+/VCqVQSgplUq6YshkMoIg5PP5crmsKEqr1YJoAET8iIbURiLCGkgoxJ16gv58f5BeNx1SHq07FQBBNDBTFVbJ4sPFkvPMtmKJhFP0AAAY9Ho9VVXr9XqlUhFFcW9vTxAEXToUCgURhJJCoaDLBUEQ9vb2RFGsVCr1el1VVYgGQMSraFDW7idcVjgSl0AWkpQ3IJRH69bHfUJQd4oGVqqD9PryevqAah7PQshCPJGI3N+a/U+PAxAQvV6v3W43Gg1ZlkulkiiK+Xw+m83mcjmIhtBSKBRyuVw2m83n86IolkolWZYbjUa73YZoAEQCH2mgv2mppG8SJgUKq44pAw7RwEq1naQPM2gYaQBgJJyennY6HVVVj46OZFmuVCrlclmSJEmSJj0GD1gY16hSqciyfHR0pKpqp9M5PT2dtE+BMBL0mgaeJZBK+uZAN/AsciSLBlqq7eSK/5EGxupOAACds7OzXq93cnKiqmqj0ajX64qi1Go1WZYnvdoPsNAvkKIo9Xq90WioqnpyctLr9c7OzibtUyCMBPz2RGqD5xndMrlgXZ1ALsltTYMte7MoIR8lCg68PQHAMOi6odPptNttVVVbrVaz2Zz0S4XAnWaz2Wq1VFVtt9udTgeKATAI9jsNpCWQmqY53lywRXT7ew3nkwvbSccchGnegZZK0yxTIeziBofwnQYAhubs7Oz09LRnogtCj/l6nZ6eQjEABkF+EbK4dR+LBwEAAIBZJUDREMQfmwAAAABAWMFfuQQAAAAAFxANAAAAAOCiLxrk4zNj+/a35r79rTnzHmzYsGHDhg0btv8HVFUzy35im8AAAAAASUVORK5CYII=" alt="" />

说明:mybatis底层通过ognl从pojo中获取属性值:#{user.username},user即是传入的包装对象的属性。queryVo是别名,即上边定义的包装对象类型。

4.  传递hashmap

Sql映射文件定义如下:

<!-- 传递hashmap综合查询用户信息 -->
<select id="findUserByHashmap" parameterType="hashmap" resultType="user">
select * from user where id=#{id} and username like '%${username}%'
</select>

上边红色标注的是hashmap的key。

测试:

Public void testFindUserByHashmap()throws Exception{
//获取session
SqlSession session = sqlSessionFactory.openSession();
//获限mapper接口实例
UserMapper userMapper = session.getMapper(UserMapper.class);
//构造查询条件Hashmap对象
HashMap<String, Object> map = new HashMap<String, Object>();
map.put("id", 1);
map.put("username", "管理员"); //传递Hashmap对象查询用户列表
List<User>list = userMapper.findUserByHashmap(map);
//关闭session
session.close();
}

异常测试:

传递的map中的key和sql中解析的key不一致。

测试结果没有报错,只是通过key获取值为空。

5.传递List

sql定义:(输入类型为List,collection定义为list)

    <select id="getQuestionsForExamPaper" parameterType="java.util.List"
resultMap="questionAndOptionForPaper">
SELECT * FROM questions q,options o WHERE
q.questionId=o.questionId and
q.questionId in
<foreach collection="list" item="id" separator="," open="("
close=")">
#{id}
</foreach>
</select>

Java 测试:

    // 测试根据ID集合查询试题
@Test
public void test2() throws SQLException {
Map<String, Object> condition = new HashMap<String, Object>();
condition.put("type", "单选题");
condition.put("level", 1);
condition.put("num", 3);
List<String> IDs = questionsCustomMapper.getQuestionsIdsForExamPaper(condition);
List<Questions> questions = questionsCustomMapper.getQuestionsForExamPaper(IDs);
System.out.println(questions.size());
}

foreach 的主要用在构建in条件中,它可以在SQL语句中进行迭代一个集合。foreach元素的属性主要有 item,index,collection,open,separator,close。item表示集合中每一个元素进行迭代时的别名,index指 定一个名字,用于表示在迭代过程中,每次迭代到的位置,open表示该语句以什么开始,separator表示在每次进行迭代之间以什么符号作为分隔 符,close表示以什么结束,在使用foreach的时候最关键的也是最容易出错的就是collection属性,该属性是必须指定的,但是在不同情况 下,该属性的值是不一样的,主要有一下3种情况:

    1. 如果传入的是单参数且参数类型是一个List的时候,collection属性值为list .
    2. 如果传入的是单参数且参数类型是一个array数组的时候,collection的属性值为array .

    3. 果传入的参数是多个的时候,我们就需要把它们封装成一个Map了,当然单参数也可以封装成map,实际上如果你在传入参数的时候,在MyBatis里面也
      是会把它封装成一个Map的,map的key就是参数名,所以这个时候collection属性值就是传入的List或array对象在自己封装的map
      里面的key.

------------------------------------resultType输出类型----------------------------------------

1. 输出简单类型

Mapper.xml文件

<!-- 获取用户列表总数 -->

    <select id="findUserCount" parameterType="user" resultType="int">

       select count(1) from user

    </select>

Mapper接口

public int findUserCount(User user) throws Exception;

测试:

Public void testFindUserCount() throws Exception{

       //获取session

       SqlSession session = sqlSessionFactory.openSession();

       //获取mapper接口实例

       UserMapper userMapper = session.getMapper(UserMapper.class);

       User user = new User();

       user.setUsername("管理员");

       int count = userMapper.findUserCount(user);

       //关闭session

       session.close();

    }

总结:

输出简单类型必须查询出来的结果集有一条记录,最终将第一个字段的值转换为输出类型。

使用session的selectOne可查询单条记录。

2.   输出pojo对象

Mapper.xml

   <!-- 根据id查询用户信息 -->

    <select id="findUserById" parameterType="int" resultType="user">

       select * from user where id = #{id}

    </select>

Mapper接口:

public User findUserById(int id) throws Exception;

测试:

Public void testFindUserById() throws Exception {

       //获取session

       SqlSession session = sqlSessionFactory.openSession();

       //获限mapper接口实例

       UserMapper userMapper = session.getMapper(UserMapper.class);

       //通过mapper接口调用statement

       User user = userMapper.findUserById(1);

       System.out.println(user);

       //关闭session

       session.close();

    }

使用session调用selectOne查询单条记录。

3.    输出pojo列表(list集合)

Mapper.xml

<!-- 根据名称模糊查询用户信息 -->

    <select id="findUserByUsername" parameterType="string" resultType="user">

       select * from user where username like '%${value}%'

    </select>

Mapper接口:

public List<User> findUserByUsername(String username) throws Exception;

测试:

Public void testFindUserByUsername()throws Exception{

       //获取session

       SqlSession session = sqlSessionFactory.openSession();

       //获限mapper接口实例

       UserMapper userMapper = session.getMapper(UserMapper.class);

       //如果使用占位符号则必须人为在传参数中加%

       //List<User> list = userMapper.selectUserByName("%管理员%");

       //如果使用${}原始符号则不用人为在参数中加%

       List<User> list = userMapper.findUserByUsername("管理员");

       //关闭session

       session.close();

    }

使用session的selectList方法获取pojo列表。

4.   输出hashmap(一般不用,在需要查询指定列并转为接送的时候可以使用)

  输出pojo对象可以改用hashmap输出类型,将输出的字段名称作为map的key,value为字段值。

  这样一个语句简单作用于所有列被自动映射到 HashMap 的键上,这由 resultType 属性指定。这在很多情况下是有用的,但是 HashMap 不能很好描述一个领域模型。那样你的应用程序将会使用 JavaBeans 或 POJOs(Plain Old Java Objects,普通 Java 对象)来作为领域模型。

    <!-- S 查询部门树 -->
<select id="getDepartmentTreeForExam" resultType="map">
SELECT
departmentId,upDepartmentId,departmentName FROM department
</select>
<!-- E 查询部门树 -->

mapper接口:

    /**
* 查询部门id,上级id,部门名称生成内部部门树
*
* @return 一个map包含部门的部门id,上级id,部门名称
* @throws SQLException
*/
public List<Map<String,Object>> getDepartmentTreeForExam() throws SQLException;

测试:

package cn.xm.exam.test.daoTest;

import java.sql.SQLException;
import java.util.List;
import java.util.Map; import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import cn.xm.exam.mapper.employee.in.custom.DepartmentCustomMapper; @RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath:spring/applicationContext-*.xml")
public class DepartmentCustomMapperTest {
@Autowired
private DepartmentCustomMapper departmentCustomMapper; @Test
public void testGeneDepartmentTree() throws SQLException {
List<Map<String, Object>> departmentTree = departmentCustomMapper.getDepartmentTreeForExam();
System.out.println(departmentTree);
} }

结果:

[{departmentId=10, departmentName=厂级-1}, {departmentId=10001, departmentName=部门1_10, upDepartmentId=10}, {departmentId=10001001, departmentName=班组1_10001, upDepartmentId=10001}, {departmentId=10002, departmentName=部门2_10, upDepartmentId=10}, {departmentId=10002001, departmentName=班组2_10002, upDepartmentId=10002}, {departmentId=10003, departmentName=部门3_10, upDepartmentId=10}, {departmentId=11, departmentName=厂级-2}, {departmentId=11001, departmentName=部门1_11, upDepartmentId=11}, {departmentId=12, departmentName=厂级-3}]

5.输出Set集合(去掉重复元素)

接口:

    /**
* 根据用户ID查询用户所有的角色名称
* @param userId 用户ID
* @return
* @throws SQLException
*/
public Set<String> getUserRoleNameByUserId(@Param("userId") String userId)throws SQLException;

XML实现:

    <!--4.根据userid查询所有的用户角色名称-->
<select id="getUserRoleNameByUserId" resultType="string" parameterType="string">
SELECT DISTINCT
roleName
FROM role
WHERE roleid IN(SELECT
roleid
FROM user_role
WHERE userid = #{userId})
</select>

resultType总结:

  输出pojo对象和输出pojo列表在sql中定义的resultType是一样的。

  返回单个pojo对象要保证sql查询出来的结果集为单条,内部使用session.selectOne方法调用,mapper接口使用pojo对象作为方法返回值。

  返回pojo列表表示查询出来的结果集可能为多条,内部使用session.selectList方法,mapper接口使用List<pojo>对象作为方法返回值。

---------------------- ----------- resultMap输出结果---------------------------------------------

  resultType可以指定pojo将查询结果映射为pojo,但需要pojo的属性名和sql查询的列名一致方可映射成功。

如果sql查询字段名和pojo的属性名不一致,可以通过resultMap将字段名和属性名作一个对应关系 ,resultMap实质上还需要将查询结果映射到pojo对象中。

resultMap可以实现将查询结果映射为复杂类型的pojo,比如在查询结果映射对象中包括pojo和list实现一对一查询和一对多查询。

1  Mapper.xml定义

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyYAAAD7CAIAAAAQHRcJAAAgAElEQVR4nO3dTW8bV4LucfYL7m56O/0ZvLxoeKEN+xNklV3Q0BggtL3eZGHgCiQGIOCVRwJGkBfOKmghbVpwA+6oEQwMmhqN09cdjZ1YZJyrHosaz1XLIpy4bekacRTXLIqsOu91qlhFlsT/DwXDZL2dqjpV9fDUIVX59vVbcQgAAACQtwqRCwAAoGhELgAAgMIRuQAAAApH5AIAACgckQsAAKBw6SPXdrc6325uF180AACA8yJ95Dro1yYbuarzbfebxglyXFeGWXyWE01TnW+Lw5jl8Vzp+BO4p5zMQUncXcq+Taw257WyAQCmzhm5Dvq1+e6WMkfxkUu/TRrvmrbIokzjXohx7YnlcU9ve9M2jeOO7tgQ2/sZNtBnrH9kca893zL7RC7by/D/M1LZsjj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wjMwWVj3dx0tNWq11qt2qi/fLPVirrJ2yOX0itLWbstcjnn4huLAADAWzkiV6D/LpfWcX4k/ELisPEp7Pk+ylWOyBXNaPj6oT1yuebid7kAAIC30kQu2e7mKr3RAQDAuVHOyOX7RxUBAADOhHJGLgAAgHOFyAUAAFC4HCLXTunlvtcAAABSIXIBAAAUjsgFAABQOCIXAABA4TJHrvh3HLJHoc9uRD8x+uFn+SUsTXG7DwAAwEfWyNVbr4x+LH7sRPTZhzlGrs9uVOs31uT3Ctt7AAAAXpyRS/0jPLGN9finSsdPSZOIXPx9HgAAMD32yGX6U9NDcnwZPyVNppWLv0INAACmxRy5djdXHelkd3O1sh6PC2PN3ZvXhD//LIceoc9W9YaerSyRyzXX/WvX4j81/cHN+1oBpFFSyW05EgAAoDCGyLWx3qi4nsH1FuQ0ZmtbEqJYNOr+tWt6fjJELudcn31ojm5RUHP25RpszjUaYmQEAAAomhq5llYbFUv/rSGh43woapEyPRy8f+3asKnJHon0yOWa6+7Na9VrN++aA5dn9/neQqNRWd3czX13AgAAmKRt5Yp/GyIyikk3P5Af50VxSnvelxi5XHOt3bA3cflELlq5AADAxKXsy2X63p8aeu7f/CBOXT5d482RyzbX2o169lYux3cCAAAACpPuG4sb64b2IS31SI8F5V5ZnpHLOZcU6cxjlaXFhecbiwAAYBpS/S6X2nE+tKN9W1DJQ+p3CUePBdduaE8PhSeGtrmiXOWzuvgbi/wuFwAAmJ4Uvz6/u7lq7HLuasAqh+J2HwAAgA//yGXoOB+adqBKVtzuAwAA8JH5z1rHph2okuW+1wAAAFIhcgEAABQuh8gFAAAANyIXAABA4f4bCjHXUqZ5dTUAAAAASUVORK5CYII=" alt="" />

2.  定义resultMap

<!-- 定义resultMap
将SELECT id id_,username username_ FROM USER 和User类中的属性作一个映射关系 type:resultMap最终映射的java对象类型,可以使用别名
id:对resultMap的唯一标识
-->
<resultMap type="user" id="userResultMap">
<!-- id表示查询结果集中唯一标识
column:查询出来的列名
property:type指定的pojo类型中的属性名
最终resultMap对column和property作一个映射关系 (对应关系)
-->
<id column="id_" property="id"/>
<!--
result:对普通名映射定义
column:查询出来的列名
property:type指定的pojo类型中的属性名
最终resultMap对column和property作一个映射关系 (对应关系)
-->
<result column="username_" property="username"/> </resultMap>

<id />:此属性表示查询结果集的唯一标识,非常重要。如果是多个字段为复合唯一约束则定义多个<id />。

Property:表示person类的属性。

Column:表示sql查询出来的字段名。

Column和property放在一块儿表示将sql查询出来的字段映射到指定的pojo类属性上。

<result />:普通结果,即pojo的属性。

3.  Mapper接口定义

public List<User> findUserListResultMap() throws Exception;

参考:http://www.cnblogs.com/qlqwjy/p/7295426.html

Normal
0

7.8 磅
0
2

false
false
false

EN-US
ZH-CN
X-NONE

/* Style Definitions */
table.MsoNormalTable
{mso-style-name:普通表格;
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.5pt;
mso-bidi-font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-font-kerning:1.0pt;}

mybatis输入输出映射——(五)的更多相关文章

  1. Mybatis输入输出映射_动态sql_关联关系(一对一、一对多、多对多)

    Mybatis输入输出映射_动态sql_关联关系(一对一.一对多.多对多)输入输出映射parameterType完成输入映射parameterType可以传入的参数有,基本数据类型(根据id查询用户的 ...

  2. Mybatis输入输出映射

    一.输入映射 1.传递简单类型 <select id="findUserById" parameterType="int" resultType=&quo ...

  3. MyBatis学习总结(二)——MyBatis核心配置文件与输入输出映射

    在上一章中我们学习了<MyBatis学习总结(一)——ORM概要与MyBatis快速起步>,这一章主要是介绍MyBatis核心配置文件.使用接口+XML实现完整数据访问.输入参数映射与输出 ...

  4. mybatis系列笔记(4)---输入输出映射

    输入输出映射 通过parameterType制定输入参数类型 类型可以是简单类型(int String)也可以是POJO本身 或者包装类 1输入映射 关于输入简单类型和pojo本身的我就不写了,因为比 ...

  5. mybatis框架(4)---输入输出映射

    输入输出映射 通过parameterType制定输入参数类型 类型可以是简单类型(int String)也可以是POJO本身 或者包装类 1输入映射 关于输入简单类型和pojo本身的我就不写了,因为比 ...

  6. 【Mybatis高级映射】一对一映射、一对多映射、多对多映射

    前言 当我们学习heribnate的时候,也就是SSH框架的网上商城的时候,我们就学习过它对应的高级映射,一对一映射,一对多映射,多对多映射.对于SSM的Mybatis来说,肯定也是差不多的.既然开了 ...

  7. mybatis快速入门(五)

    今天写写user表和orders表的mybatis的高级映射,一对一映射和一对多映射 1.创建一个orders.java文件 1.1一对一映射,一条订单对应一个用户 package cn.my.myb ...

  8. MyBatis 关系映射XML配置

    关系映射 在我看来这些实体类就没啥太大关联关系,不就是一个sql语句解决的问题,直接多表查询就完事,程序将它设置关联就好 xml里面配置也是配置了sql语句,下面给出几个关系的小毛驴(xml) 一对多 ...

  9. mybatis高级映射(一对一,一对多)

    mybatis高级映射 一对一关联映射 需求:查询订单信息,关联查询用户信息(一个订单对应一个用户) (1)通过resultType实现 sql语句: select orders.* , USER.u ...

随机推荐

  1. 【Alpha】第七次Scrum meeting

    今日任务一览: 姓名 今日完成任务 所耗时间 刘乾 今日没有做很多事...一天都在沟通细化需求与画电路图 2 鲁聃 生成物理报告实验页面的生成 Issue链接:https://github.com/b ...

  2. 20135202闫佳歆--week5 分析system_call中断处理过程--实验及总结

    week 5 实验:分析system_call中断处理过程 一.使用gdb跟踪分析一个系统调用内核函数(上周选择那一个系统调用)--getpid 复习视频: 如何实现? - 更新menu代码到最新版 ...

  3. 20135337朱荟潼 Linux第二周学习总结——操作系统是如何工作的

    一.计算机是如何工作的--总结 三个法宝 存储程序计算机.函数调用堆栈.中断机制 二.堆栈 1.是c语言程序运行时必须的一个记录调用路径和参数的空间. 函数调用框架.传递参数.保存返回地址.提供局部变 ...

  4. wia驱动扫描仪

    .net wia驱动扫描仪 通过各种途径,将当前比较流行的驱动扫描仪封装成了一个简单实用的class,调用扫描仪时,只需要重新创建个对象即可,代码如下: using System;using Syst ...

  5. ubuntu18.04配置nvidia docker和远程连接ssh+远程桌面连接(三)

    ubuntu18.04配置nvidia docker和远程连接ssh+远程桌面连接(三) 本教程适用于想要在远程服务器上配置docker图形界面用于深度学习的用户. (三)配置远程桌面连接访问dock ...

  6. final发布简评

    1.nice!——约跑app:本次发布使用摄像头展示,比之前清晰的多,展示效果很好,值得学习!功能都已实现,已经可以使用,好评. 2.飞天小女警——礼物挑选:本次发布风格与上次不同,除此之外添加了猜你 ...

  7. bash基本功能 -命令的别名和快捷键

    命令的别名 == 人的小名 如何查看和设定别名 alias 查看系统中的所有别名 ls --color=auto alias ll = 'ls - l --color=auto' touch abc ...

  8. Android控件第2类——ImageView

    1.ImageView不仅仅可以显示图片,ImageView可以显示任何Drawable对象. adjustViewBounds:设置ImageView是否调整自己的边界来保证图片的长宽比. crop ...

  9. thinkphp在app接口开发过程中的通讯安全认证

    对于我们写好的接口,如果不经过安全认证就可以直接访问的话,则将对我们网站产生非常大的安全隐患,一些hack可能直接用你的接口去操作数据库,后果无法估量.那么如何才能进行有效的安全验证呢? 这里我采用了 ...

  10. OneZero第四周第四次站立会议(2016.4.14)

    1. 时间: 15:00--15:10  共计10分钟. 2. 成员: X 夏一鸣 * 组长 (博客:http://www.cnblogs.com/xiaym896/), G 郭又铭 (博客:http ...