Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘sqlSessionFactory’ defined in class path resource。。。。。 记一次错误
这里写自定义目录标题
完整错误
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘sqlSessionFactory’ defined in class path resource [org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method ‘sqlSessionFactory’ threw exception; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [mybatis/mybatis-config.xml]; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: org.apache.ibatis.builder.BuilderException: The setting cacheEnable is not known. Make sure you spelled it correctly (case sensitive).
翻译一下
人家说的很明显
创建sqlSessionFactory失败——》未能解析my batis/my batis-config . XML文件——》原因是org . Apache . ibatis . builder . buildereexception:cache enable设置未知
打开my batis-config . XML一看
cacheEnable少打了一个“d”
结果应该是
问题解决了,得出结论。基础不牢,地动山摇。