为了账号安全,请及时绑定邮箱和手机立即绑定

单元测试启动就报错了,不知道是哪里错了?帮忙看看错误啊

 Error creating bean with name 'areaDao' defined in file
[E:\javacode\springbootmybatisdemo\target\classes\com\spring\springbootmybatisdemo\dao\AreaDao.class]:

Unsatisfied dependency expressed through bean property 'sqlSessionFactory';

nested exception is org.springframework.beans.factory.BeanCreationException:

Error creating bean with name 'sqlSessionFactory' defined in class path resource [com/spring/springbootmybatisdemo/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 userColumnLabel is not known.  

Make sure you spelled it correctly (case sensitive).

正在回答

2 回答

已经找到原因了,mybatis-config.xml中需要将下面这个配置注释掉,不然就会报错!
<setting name="userColumnLabel" value="true" />

0 回复 有任何疑惑可以回复我~
#1

qq_谐星_0

把这个注释掉那些值就取不到了啊,驼峰命名没了,后面怎么办啊兄弟。我你一样的问题,注释掉了就不报错了,但是有些值就取不到了。
2018-06-28 回复 有任何疑惑可以回复我~

你看下数据库配置是否有误,可以断点查看

createSqlSessionFactoryBean

方法体中 读取的mysql和用户名密码的配置内容

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

单元测试启动就报错了,不知道是哪里错了?帮忙看看错误啊

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信