完整错误:
Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [D:\workspace_java\sdk-kit-backend\target\classes\mapper\mybatis-conf.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is 'file [D:\workspace_java\sdk-kit-backend\target\classes\mapper\mybatis-conf.xml]'. Cause: java.lang.NullPointerException
错误原因一
application.properties
中只配置了mapper.xml
路径没有配置mybatis
核心配置文件mybatis-conf.xml
的路径
错误原因二
楼主的问题也刚好在错误原因二上
把mybatis
核心配置文件写在了mapper.xml
同一个的路径下