| Setting (SET) |
Description (description) |
Valid values (validation value Group) |
Default (Defaults) |
| Cacheenabled |
Enable or disable caching in global scope any mapper under this configuration. |
true | False |
TRUE |
| Lazyloadingenabled |
Enables or disables lazy loading at the global scope. When disabled, all associations will be hot loaded. |
true | False |
TRUE |
| Aggressivelazyloading |
When enabled, objects with lazy loading properties will be fully loaded after calling any property of laziness. Otherwise, each property is loaded on demand. |
true | False |
TRUE |
| Multipleresultsetsenabled |
Allows or does not allow multiple result sets to be returned from a separate statement (requiring a compatible driver). |
true | False |
TRUE |
| Usecolumnlabel |
Use column labels instead of column names. In this respect, different drivers have different behaviors. Refer to the driver documentation or test two methods to determine how your driver behaves. |
true | False |
TRUE |
| Usegeneratedkeys |
Allows JDBC to support generated keys. A compatible driver is required. This setting forces the generated keys to be used, and if set to true, some drivers will not be compatible but still work. |
true | False |
FALSE |
| Automappingbehavior |
Specifies how the MyBatis should automatically map columns to fields/properties. None Auto-map. Partial will only automatically map results without nested result mapping definitions inside. Full will automatically map the result map to any complex (containing nested or other). |
NONE, PARTIAL, full |
PARTIAL |
| Defaultexecutortype |
Configure the default performer. Simple executive is really nothing special. The reuse executor uses the prepared statement. Batch Executor uses statements and batch updates. |
Simple Reuse BATCH |
Simple |
| Defaultstatementtimeout |
Sets the number of seconds that the driver waits for a database response. |
Any positive integer |
Not Set (NULL) |
| Saferowboundsenabled |
Nested statements are allowed to be used rowbounds. |
true | False |
FALSE |
| Mapunderscoretocamelcase |
The classic Java attribute name acolumn that is automatically mapped to the Camel logo is enabled from the Classic database column name A_column. |
true | False |
FALSE |
| Localcachescope |
MyBatis uses a local cache to prevent circular references and to speed up repeatedly nested queries. All query caches that are executed by default (session) during sessions. If the Localcachescope=statment local session is to be used for the execution of the statement, just do not share the data between the two different calls of the same sqlsession. |
SESSION | STATEMENT |
SESSION |
| Dbctypefornull |
When you specify a null value, there is no JDBC type for the parameter of the specific JDBC type. Some drivers need to specify the JDBC type of the column, but others like Null,varchar or other work with common values. |
Jdbctype enumeration. Most common Are:null, VARCHAR and other |
Other |
| Lazyloadtriggermethods |
Specifies methods that trigger deferred loading of an object. |
A method Name list separated by commas |
Equals,clone,hashcode,tostring |
| Defaultscriptinglanguage |
Specifies that the language used defaults to dynamic SQL generation. |
A type alias or fully qualified class name. |
Org.apache.ibatis.scripting.xmltags.XMLDynamicLanguageDriver |
| Callsettersonnulls |
Specifies that the retrieved value is null if the setter method or the map's put method is called. It is useful when you rely on map.keyset () or null initialization. Note that primitives (such as integers, booleans, and so on) are not set to null. |
true | False |
FALSE |
| Logprefix |
The specified prefix string, MyBatis, will increase the name of the logger. |
Any String |
Not set |
| Logimpl |
Specifies that the log implementation of MyBatis is used. If this setting is not present, the implementation of the record will be automatically found. |
slf4j | log4j | Log4j2 | jdk_logging | commons_logging | stdout_logging | No_logging |
Not set |
| Proxyfactory |
Specifies the agent tool, MyBatis will use objects that create lazy loading capabilities. |
CGLIB | JAVASSIST |
|