看上去没错。不过有三点 1 <![CDATA[ SELECT * From SYS_Userinfo WHERE Usercode=#Usercodee# and Userpwd=#Userpwd# ]]> 这一段话,是你的原样,还是黏贴问题,应该是 <![CDATA[ SELECT * From SYS_Userinfo WHERE Usercode=#Usercodee# and Userpwd=#Userpwd# ]]>2 这段xml后是否又出现sqlMap 3 在xml中是否有中文BTW :为什么有两个Userperemail
</sqlMap>//namespace可以为空
1 <![CDATA[
SELECT * From SYS_Userinfo
WHERE Usercode=#Usercodee# and Userpwd=#Userpwd#
]]>
这一段话,是你的原样,还是黏贴问题,应该是
<![CDATA[
SELECT * From SYS_Userinfo
WHERE Usercode=#Usercodee# and Userpwd=#Userpwd#
]]>2 这段xml后是否又出现sqlMap
3 在xml中是否有中文BTW :为什么有两个Userperemail
<typeAlias alias="Userinfo" type="domain.Userinfo"/>namespace和type都必须要使用完整路径resultClass="UserResult" 要改为resultMap="UserResult"