mybatismapperAdminMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'Admin'. Cause: java.lang.ClassNotFoundException: Cannot find class: Admin]
ResultType要写全类名,不然会被作为Mybatis的Alias 。 使用了MybatisGenerator 可以使用resultMap="BaseResultMap" 自定做了封装
<select id="selectAdminByLoginAcct" resultMap="BaseResultMap">
select id, login_acct, user_pswd, user_name, email, create_time from t_admin where
login_acct = #{loginAcct}
</select>