Mybatis-config Configuration Setting description

Source: Internet
Author: User
Tags configuration settings


1. <!– Configuration Settings –>

2. <settings>

3. <!– configuration Global cache (on/off) default:true–>

4. <setting name= "cacheenabled" value= "true"/>

5.

6. <!– whether to load the associated object with lazy load as hibernate in the default:true–>

7. <setting name= "lazyloadingenabled" value= "true"/>

8.

9. <!–[when the object uses deferred loading, the load of the property depends on the deferred attributes that can be referenced, otherwise, load on demand (the time required to load)]–>

<setting name= "aggressivelazyloading" value= "true"/>

11.

<!– whether a single SQL is allowed to return multiple datasets (depending on driver compatibility) default:true–>

<setting name= "multipleresultsetsenabled" value= "true"/>

14.

<!– whether the alias of the column can be used (depending on the driver compatibility) default:true–>

<setting name= "Usecolumnlabel" value= "true"/>

17.

<!– allows JDBC to generate primary keys. Drive support is required.  If set to true, this setting enforces the generated primary key, and some drives are incompatible but can still be executed. Default:false–>

<setting name= "Usegeneratedkeys" value= "false"/>

20.

<!– Specifies how mybatis automatically map the columns of a data base table none: Insinuate PARTIAL: Partial full: All –>

<setting name= "Automappingbehavior" value= "PARTIAL"/>

23.

<!– This is the default execution type

Simple: Easy

Reuse: Actuators may reuse prepared statements Statements

BATCH: Actuators can repeatedly execute statements and batch updates

28.–>

<setting name= "Defaultexecutortype" value= "simple"/>

30.

<!– sets the timeout number for the driver waiting for data response default is not set –>

<setting name= "defaultstatementtimeout" value= "25000″/>

33.

<!–[whether row inline nested statements are enabled defaut:false]–>

<setting name= "saferowboundsenabled" value= "false"/>

36.

<!–[whether the a_column automatically map to the camel named properties in the Java class is enabled in the data default:fasle]–>

<setting name= "Mapunderscoretocamelcase" value= "false"/>

39.

<!– set Local Cache scope session: There will be shared data statement: statement scope (so that no data is shared) defalut:session–>

<setting name= "Localcachescope" value= "session"/>

42.

<!– setting but when the JDBC type is empty, some drivers want to specify a value,default:other–>

<setting name= "Jdbctypefornull" value= "DEFAULT"/>

45.

<!– set a method for triggering deferred loading –>

<setting name= "Lazyloadtriggermethods" value= "equals,clone,hashcode,tostring"/>

48.

</settings>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.