记录一次自己犯下的低级错误,但一旦出现就比较难被发现
看了下console里面的启动log,发现反复重复这样的一段:
Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [E:\WebProject\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp2\wtpwebapps\erpbase\WEB-INF\classes\com\erpbase\mapping\KuCunMapper.xml]'; nested exception is java.lang.RuntimeException: Error parsing Mapper XML. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class . Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'BaseResultMap'. Cause: java.lang.ClassNotFoundException: Cannot find class: BaseResultMap
去KuCunMapper.xml里面查找跟“BaseResultMap”有关的内容,发现:
<select id="getExistingKucun" resultType="BaseResultMap" parameterType="com.erpbase.model.KuCun">
将resultType改成resultMap就可以了。