{"record":{"id":"32f8bb157651b332","repo":"baomidou/mybatis-plus","slug":"the-setting-s-is-not-known-make-sure-you-spelle","errorCode":null,"errorMessage":"The setting %s is not known.  Make sure you spelled it correctly (case sensitive).","messagePattern":"The setting (.+?) is not known\\.  Make sure you spelled it correctly \\(case sensitive\\)\\.","errorType":"exception","errorClass":"BuilderException","httpStatus":null,"severity":"error","filePath":"mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/MybatisXMLConfigBuilder.java","lineNumber":147,"sourceCode":"            environmentsElement(root.evalNode(\"environments\"));\n            databaseIdProviderElement(root.evalNode(\"databaseIdProvider\"));\n            typeHandlersElement(root.evalNode(\"typeHandlers\"));\n            mappersElement(root.evalNode(\"mappers\"));\n        } catch (Exception e) {\n            throw new BuilderException(\"Error parsing SQL Mapper Configuration. Cause: \" + e, e);\n        }\n    }\n\n    private Properties settingsAsProperties(XNode context) {\n        if (context == null) {\n            return new Properties();\n        }\n        Properties props = context.getChildrenAsProperties();\n        // Check that all settings are known to the configuration class\n        MetaClass metaConfig = MetaClass.forClass(Configuration.class, localReflectorFactory);\n        for (Object key : props.keySet()) {\n            if (!metaConfig.hasSetter(String.valueOf(key))) {\n                throw new BuilderException(\n                    \"The setting \" + key + \" is not known.  Make sure you spelled it correctly (case sensitive).\");\n            }\n        }\n        return props;\n    }\n\n    private void loadCustomVfsImpl(Properties props) throws ClassNotFoundException {\n        String value = props.getProperty(\"vfsImpl\");\n        if (value == null) {\n            return;\n        }\n        String[] clazzes = value.split(\",\");\n        for (String clazz : clazzes) {\n            if (!clazz.isEmpty()) {\n                @SuppressWarnings(\"unchecked\")\n                Class<? extends VFS> vfsImpl = (Class<? extends VFS>) Resources.classForName(clazz);\n                configuration.setVfsImpl(vfsImpl);\n            }","sourceCodeStart":129,"sourceCodeEnd":165,"githubUrl":"https://github.com/baomidou/mybatis-plus/blob/bf67d907478c724120bf76292da54abf9e73c2b3/mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/MybatisXMLConfigBuilder.java#L129-L165","documentation":"Thrown by settingsAsProperties when a <settings> entry in mybatis-config.xml does not correspond to a writable setter on the Configuration class. Each <setting name=\"...\"> is validated reflectively via MetaClass.hasSetter against org.apache.ibatis.session.Configuration, and unknown names are rejected with a case-sensitive check.","triggerScenarios":"Including <setting name=\"cacheEnabled \" .../> (trailing space), a misspelled name like \"lazyLoadingEnabeld\", or a MyBatis-Plus-specific property incorrectly placed in the MyBatis <settings> block instead of the Spring property namespace.","commonSituations":"Typos or wrong casing in setting names; copying setting names from mybatis-plus documentation into the mybatis <settings> element; names valid only in newer/older MyBatis versions than the one on the classpath.","solutions":["Correct the name and casing to exactly match a Configuration setter property (e.g. mapUnderscoreToCamelCase, cacheEnabled, lazyLoadingEnabled).","Remove any MyBatis-Plus-specific settings from the MyBatis <settings> block and set them via mybatis-plus.configuration.* in Spring Boot instead.","Verify the setting exists in the MyBatis version actually resolved by the dependency tree (mvn dependency:tree)."],"exampleFix":"<!-- before -->\n<settings>\n  <setting name=\"LazyLoadingEnabled\" value=\"true\"/>\n  <setting name=\"mybatis-plus.cache\" value=\"true\"/>\n</settings>\n\n<!-- after -->\n<settings>\n  <setting name=\"lazyLoadingEnabled\" value=\"true\"/>\n</settings>","handlingStrategy":"validation","validationCode":"// check setting names against Configuration setters before building\norg.apache.ibatis.reflection.MetaClass mc = org.apache.ibatis.reflection.MetaClass\n    .forClass(org.apache.ibatis.session.Configuration.class, new org.apache.ibatis.reflection.DefaultReflectorFactory());\nfor (String name : Arrays.asList(\"mapUnderscoreToCamelCase\", \"lazyLoadingEnabled\")) {\n    if (!mc.hasSetter(name)) throw new IllegalStateException(\"Unknown setting: \" + name);\n}","typeGuard":null,"tryCatchPattern":"Catch BuilderException 'The setting ... is not known' during startup; correct or remove the named setting (given verbatim in the message) and restart.","preventionTips":["Copy setting names from the Configuration class or official docs, not from memory.","In Spring Boot use mybatis-plus.configuration.* properties, which fail with clearer diagnostics."],"tags":["mybatis","mybatis-plus","xml-config","settings","typo"],"backgroundTag":null,"analyzedSha":"bf67d907478c724120bf76292da54abf9e73c2b3","analyzedAt":"2026-08-14T15:17:09.543Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}