springboot
框架:springboot+mybatisplus+shiro+thymeleaf
问题:Could not resolve type alias ''xxx".
Cause: : Cannot find class: xxx
这个是Mybatis最常见的错误之一
首先:最常见的出错原因是在里面
我的原因:
<select parameterType="string" resultMap="BaseResultMap">
SELECT * FROM games
</select>
一定要注意返回类型的选择,要写
resultMap="BaseResultMap"
好多人出错是因为写成了resultType
用到resultType,必须在mybatis的配置文件中进行别名申明该resultType属于哪个实体类.
一般把resultType改成resultMap就解决的,这个问题基本是出现在select语句中。