ibatis参数和返回值
<sqlMap namespace="User">
<typeAlias alias="user" type="org.lq.news.db.User"/>
<select id="getUserByUsernameAndPassword" parameterresulttype="org.lq.news.db.User"/>
<insert id="insertUser" parameterparameterresultparameterresultparameterresultClass="user">
SELECT col_username as username, col_password as password FROM tb_user WHERE col_username = #username#
</select>
给数据库字段取个别名映射成为User类里面的属性名。