Skip to content

Cannot access properties in <setting /> since 3.3.1 #723

@ikeyat

Description

@ikeyat

We used <properties resource="org/mybatis/example/config.properties"> in mybatis-config.xml as shown at http://www.mybatis.org/mybatis-3/configuration.html.

We was able to access the property file until MyBatis 3.3.0 and MyBatis-Spring 1.2.3.
But since MyBatis 3.3.1 and MyBatis-Spring 1.2.5 we failed to access it. Is there any spec change in MyBatis 3.3.1? Or a bug, otherwise our mis-usage?

MyBatis version

MyBatis 3.3.1 with MyBatis-Spring 1.2.5

Database vendor and version

Anyone

Test case or example project

TBD

Steps to reproduce

  • mybatis-config.xml
<!DOCTYPE configuration PUBLIC "-//mybatis.org/DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>
    <properties resource="META-INF/mybatis/mybatis-config.properties" />

    <settings>
        <setting name="jdbcTypeForNull" value="${jdbcTypeForNull}" />
        <setting name="jdbcTypeForNull" value="NULL" />
        <setting name="mapUnderscoreToCamelCase" value="true" />
        <setting name="defaultFetchSize" value="100" />
    </settings>

    <!-- omitted -->
</configuration>
  • mybatis-config.properties
jdbcTypeForNull=NULL

Expected result

jdbcTypeForNull is set as NULL

Actual result

Got an following exception.

IllegalArgumentException: No enum constant org.apache.ibatis.type.JdbcType.${jdbcTypeForNull}

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions