标签:
在xml中加入下面一段代码
<resultMap id="BaseResultMap" type="你的po类" >
这一段是表数据字段自己写
      <id column="id" property="id" jdbcType="INTEGER" />
      <result column="username" property="username" jdbcType="VARCHAR" />
      <result column="pwd" property="pwd" jdbcType="VARCHAR" />
      <result column="right_id" property="rightId" jdbcType="INTEGER" />
</resultMap>
下面返回的类型是你上面定义的红体字<resultMap id="BaseResultMap" type="你的po类" >
 <select id="findUserList" parameterType="com.cn.imax.po.UserQueryVo"
  		 resultMap="BaseResultMap">
  		 SELECT user.*  FROM user 
  	</select>
这样带下划线的数据就可以显示了
标签:
原文地址:http://www.cnblogs.com/zhoumingming/p/5405630.html