ibatis2基础一
?
1、配置文件头
?
??
2、调用存储过程
配置文件定义存储过程,括号中代表传入的参数,参数通过Map来定义
?Java调用select u.userId as userId,u.userName as userName,u.password aspassword,r.roleId as roleId,r.roleName as roleName,re.resourceId asresourceId,re.resourceName as resourceNamefrom T_USER u left joinT_USER_ROLE ur onu.userId=ur.userIdleft joinT_ROLE r onur.roleId=r.roleIdleft joinT_ROLE_RESOURCE rre onrre.roleId=r.roleIdleft join T_RESOURCE re onrre.resourceId=re.resourceIdwhere u.userId=#{value}?5、
#默认调用PreparedStatement,防止注入
$不对string做处理?