出现org.apache.ibatis.builder.BuilderException

1.The setting defaultExcitorType is not known.

报错如下:

### Error building SqlSession.
### The error may exist in SQL Mapper Configuration
### Cause: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: org.apache.ibatis.builder.BuilderException: The setting defaultExcitorType is not known.  Make sure you spelled it correctly (case sensitive).
    at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
    at org.apache.ibatis.session.SqlSessionFactoryBuilder.build(SqlSessionFactoryBuilder.java:82)
    at com.ihrm.system.service.db.SqlSessionFactoryProxyImpl.init(SqlSessionFactoryProxyImpl.java:61)
    at com.ihrm.system.service.db.DBSessionManagerUtils.addDb(DBSessionManagerUtils.java:24)
    at com.ihrm.system.service.db.DBManagerUtils.putDB(DBManagerUtils.java:114)
    at com.ihrm.system.service.db.DBManagerUtils.build(DBManagerUtils.java:32)
    at com.ihrm.system.service.db.DBManagerUtils.main(DBManagerUtils.java:131)
Caused by: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: org.apache.ibatis.builder.BuilderException: The setting defaultExcitorType is not known.  Make sure you spelled it correctly (case sensitive).
    at org.apache.ibatis.builder.xml.XMLConfigBuilder.parseConfiguration(XMLConfigBuilder.java:122)
    at org.apache.ibatis.builder.xml.XMLConfigBuilder.parse(XMLConfigBuilder.java:99)
    at org.apache.ibatis.session.SqlSessionFactoryBuilder.build(SqlSessionFactoryBuilder.java:80)
    ... 5 common frames omitted
Caused by: org.apache.ibatis.builder.BuilderException: The setting defaultExcitorType is not known.  Make sure you spelled it correctly (case sensitive).
    at org.apache.ibatis.builder.xml.XMLConfigBuilder.settingsAsProperties(XMLConfigBuilder.java:135)
    at org.apache.ibatis.builder.xml.XMLConfigBuilder.parseConfiguration(XMLConfigBuilder.java:107)
    ... 7 common frames omitted
 

原因:mybatis.xml配置的标红部分没有相关其他配置,注释掉或者删除掉即可。

<!DOCTYPE configuration
        PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>
    <settings>
        <!-- 控制台打印sql语句 -->
        <setting name="logImpl" value="LOG4J2"/>
        <!-- 开启驼峰命名自动映射配置 -->
        <setting name="mapUnderscoreToCamelCase" value="true"/>

        <setting name="useGeneratedKeys" value="false"/>
        <setting name="callSettersOnNulls" value="true"/>
        <setting name="defaultStatementTimeout" value="10"/>

        <setting name="cacheEnables" value="false"/>
        <setting name="defaultExcitorType" value="reuse"/>
    </settings>

。。。。。。

</configuration>

2.The setting cacheEnables is not known.

报错如下:

### Error building SqlSession.
### The error may exist in SQL Mapper Configuration
### Cause: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: org.apache.ibatis.builder.BuilderException: The setting cacheEnables is not known.  Make sure you spelled it correctly (case sensitive).
    at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
    at org.apache.ibatis.session.SqlSessionFactoryBuilder.build(SqlSessionFactoryBuilder.java:82)
    at com.ihrm.system.service.db.SqlSessionFactoryProxyImpl.init(SqlSessionFactoryProxyImpl.java:61)
    at com.ihrm.system.service.db.DBSessionManagerUtils.addDb(DBSessionManagerUtils.java:24)
    at com.ihrm.system.service.db.DBManagerUtils.putDB(DBManagerUtils.java:114)
    at com.ihrm.system.service.db.DBManagerUtils.build(DBManagerUtils.java:32)
    at com.ihrm.system.service.db.DBManagerUtils.main(DBManagerUtils.java:131)
Caused by: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: org.apache.ibatis.builder.BuilderException: The setting cacheEnables is not known.  Make sure you spelled it correctly (case sensitive).
    at org.apache.ibatis.builder.xml.XMLConfigBuilder.parseConfiguration(XMLConfigBuilder.java:122)
    at org.apache.ibatis.builder.xml.XMLConfigBuilder.parse(XMLConfigBuilder.java:99)
    at org.apache.ibatis.session.SqlSessionFactoryBuilder.build(SqlSessionFactoryBuilder.java:80)
    ... 5 common frames omitted
Caused by: org.apache.ibatis.builder.BuilderException: The setting cacheEnables is not known.  Make sure you spelled it correctly (case sensitive).
    at org.apache.ibatis.builder.xml.XMLConfigBuilder.settingsAsProperties(XMLConfigBuilder.java:135)
    at org.apache.ibatis.builder.xml.XMLConfigBuilder.parseConfiguration(XMLConfigBuilder.java:107)
    ... 7 common frames omitted

原因:mybatis.xml配置的标红部分没有相关其他配置,注释掉或者删除掉即可。

<!DOCTYPE configuration
        PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>
    <settings>
        <!-- 控制台打印sql语句 -->
        <setting name="logImpl" value="LOG4J2"/>
        <!-- 开启驼峰命名自动映射配置 -->
        <setting name="mapUnderscoreToCamelCase" value="true"/>

        <setting name="useGeneratedKeys" value="false"/>
        <setting name="callSettersOnNulls" value="true"/>
        <setting name="defaultStatementTimeout" value="10"/>

        <setting name="cacheEnables" value="false"/>
    </settings>

。。。。。。

</configuration>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值