SQL语句配置中,不写入paramType,mybatis如何知道所传入参数的类型?
在接口方法中使用@Param(value="")方法来传入两个及以上参数(对应的SQL语句中不写paramType),mybatis是如何知道我传入的参数的类型?
public interface UserDao { public int getUser(@Param(value = "userName") String userName, @Param(value = "userPwd") String userPwd); }
<select id="getUser" resultType="int"> select count(*) from user where user_id = #{userId} and user_pwd = #{userPwd} </select>