Cause: java.lang.ClassNotFoundException: Cannot find class: com.kuang.pojo.User


错误

Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring-dao.xml]: Invocation of init method failed; 
nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource:
'file [E:\javaproject\Demo11\spring-01-hellospring\spring-09-transaction\target\classes\com\kuang\mapper\UserMapper.xml]';
nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is 'file
[E:\javaproject\Demo11\spring-01-hellospring\spring-09-transaction\target\classes\com\kuang\mapper\UserMapper.xml]
'.
Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException:
Could not resolve type alias 'com.kuang.pojo.User'. Cause: java.lang.ClassNotFoundException: Cannot find class: com.kuang.pojo.User

原因:实体类包的位置和sql映射文件没有正确对应