<resultMap id="BaseResultMap起名字" type="com.json.web.entity.CarCity" >
? ? <id column="數(shù)據(jù)庫(kù)字段" property="實(shí)體類字段" jdbcType="INTEGER" />
? ? <result column="city_name" property="cityName" jdbcType="VARCHAR" />
</resultMap>
<select id="findAll" resultMap="BaseResultMap">
? ? select * from car_city
? </select>