问题描述:
Caused by: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'com.UserEntity'. Cause: java.lang.ClassNotFoundException: Cannot find class: com.UserEntity
问题分析:
1、使用Mybatis的select标签时,parameterType属性对应的类型不存在,导致报错。
<select id="getUserList" resultType="com.entity.UserEntity" parameterType="com.UserEntity">
SELECT *
from users
where username = #{username} and password=#{password}
</select>
解决办法:
给parameterType属性设置正确的类型即可。