<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.mycom.mybatis_1.test1.userMapper"> <!-- 根据id查询,得到一个user对象 --> <select id="getUser" parameterType="int" resultType="com.mycom.mybatis_1.test1.User"> select * from users where id=#{id} </select> </mapper>
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/4348.html