上课的佳峰说 历史库的房间
<?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.course"> <!--id必须为唯一,因为执行的时候是匹配的id--> <!--resultType是执行结果返回的数据类型,返回一个用户数--> <select id="getUserCount" resultType="Integer"> select count(*) from user; </select> </mapper>