如若不在mybatis-config.xml中加上别名的话,也就是不加上下面的语句:
《下面两种方式都可以》
方式一:<typeAliases>
<package name="com.kuang.pojo." />
</typeAliases>
方式二:<typeAliases>
<typeAlias type="com.kuang.pojo.Student" alias="Student" />
</typeAliases>
则需要在Mapper.xml配置时,对于resultType的值则应该为com.kuang.pojo.Student而不是直接为:Student
则需要在Mapper.xml配置时,对于resultType的值则应该为com.kuang.pojo.Student
而不是直接为:Student