Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'courseOrderMapper' defined in file [F:LearningDataxxxxxxCourseOrderMapper.class]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. Cause: org.apache.ibatis.builder.BuilderException: Wrong namespace. Expected 'com.zt.ztcrm.mapper.CourseOrderMapper' but found 'com/zt/ztcrm/mapper/CourseOrderMapper'.
这是一个springboot项目,运行时Tomcat都没启动起来,于是看了一下错误信息,打开CourseOrderMapper.XML文件看了几分钟都没找到原因。再继续看错误信息,抓住了关键词“Error parsing Mapper ”,于是我猜测,可能是路径写错了。于是找到:
于是我想:这个路径是我直接copy的,没有把“/”改成“.”。我把它们都改成“.”,成功运行起来了。



