一.返回值Map 1.mapper.xml <select id="selectUserMapLimitOne" resultType="java.util.HashMap"> select id,name from user order by id desc limit 1 </select> 2.接口定义 /** * 获取仅含一个的map(map的size=字段个数) * @return */ Map<String,Object&g…
这里做了比较清晰的解释: http://mybatis.github.io/mybatis-3/java-api.html SqlSession As mentioned above, the SqlSession instance is the most powerful class in MyBatis. It is where you'll find all of the methods to execute statements, commit or rollback transacti…