maven的ssm项目找不到实体类,我的问题与解决

18:06:42.161 [main] ERROR org.springframework.web.context.ContextLoader - Context initialization failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [C:\Users\pz\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\cesiumapp\WEB-INF\classes\mapper\Ele_fieldMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is 'file [C:\Users\pz\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\cesiumapp\WEB-INF\classes\mapper\Ele_fieldMapper.xml]'. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'cesium.bean.Ele_field'.  Cause: java.lang.ClassNotFoundException: Cannot find class: cesium.bean.Ele_field

 

解决办法

1:从头到尾排查配置拼写错误。

 

2:去掉parameterType="cesium.pojo.Ele_field"

 

这是看某个文章下方,某大佬提了一句解决的

maven的ssm项目找不到实体类,我的问题与解决