问答详情
源自:3-3 datasource和sessionfactorybean的配置

测试的报错这个事怎么回事啊啊啊

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [com/imooc/demo/config/dao/SessionFactoryConfiguration.class]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [mybatis-config.xml]; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: org.apache.ibatis.builder.BuilderException: The setting mapUnderscoreToCameCase is not known.  Make sure you spelled it correctly (case sensitive)

提问者:慕设计7786465 2018-10-18 14:00

个回答

  • 慕码人212201
    2019-09-19 14:18:47

    我解决了,重新build project 会有意想不到的惊喜

  • 慕码人212201
    2019-09-19 10:33:51

    也有遇到了这个问题,楼主解决了吗

  • hocki
    2018-10-29 00:55:32

    mybatis-config.xml文件中的配置项写错了,

    你的是

    mapUnderscoreToCameCase

    正确的应该是

    mapUnderscoreToCamelCase


  • 慕设计1938066
    2018-10-18 15:04:23

    应该是这个叫sqlSessionFactory的Bean被IOC容器托管时,未能正常完成初始化而引发的异常,好像是因为Mybatis的配置文件在指定的类路径下不能被找到造成的