MyBatis's Config.xml label _java

Source: Internet
Author: User
<?xml version= "1.0" encoding= "UTF-8"?> <configuration><!--configuration--> <!--<properties resource= " Xxxxxx.properties "/> or use the Properties profile read order precedence of the read order parameter pass priority lowest--> <properties><!--Properties--> ;p roperty name= "Driver" value= "/><!--child element configuration--><!--Read order priority highest--> <property name=" url "value=" "/&G 
  T <property name= "username" value= "/> <property name=" password "value=" "/> </properties> <set Tings/><!--Set--> <typeAliases><!--type naming--> <typealias "role" alias= "type=" Xx.xxx "/><!--custom alias--> </typeAliases> <typeHandlers><!--type processor--><!--typically when using an enumeration type will use the--> <typehandler handler= "XXXX. Statustypehandler "/><!--custom enumerated type Typehandler--> </typeHandlers> <objectfactory/><!--Object Factory- -> <plugins/><!--plug-in--> <environments><!--configuration Environment--> <environment><!--environment variable--> <transactionmanager/><!--things manager--> <dataSource> <!--data source--& 
    Gt <property name= "Driver" value= "${driver}"/> <property name= "url" value= "${url}"/> <property nam  
  E= "username" value= "${username}"/> <property name= "password" value= "${password}"/> </dataSource> </environment> </environments> <databaseidprovider type= "Db_vendor" ><!--database Manufacturer logo--><!- -Db_vendor is the policy that initiates MyBatis internal registration, first MyBatis will read your configuration into the configuration class, call the Getdatabaseproductname () method after connecting the database to obtain the information of the database, and then Match with the configured name value to get DatabaseID--> <property name= "MySQL" value= "mysql"/> <property "SQL Server" value = "SQL Server"/> <!--<select parametertype= "string" databaseid= "MySQL" >sql statement </select>--> </d atabaseidprovider> <mappers><!--Mapper 4 ways to introduce--> <mapper resource= "Com/learn/mapper/xxx.xml"/&GT;&L t;! --Using file paths to introduce--> <package name= "com.learn.mapper"/><!--Use the package name to introduce--> <mapper class= "Com.learn.mapper.roleMapper"/ ><!--Use class registration to refer to--> <mapper url= "File:///src/mappers/com/learn/mapper/xxx.xml"/><!--use Xxx.xml to introduce-  -> </mappers> </configuration>

The above is a small set to introduce the MyBatis Config.xml label, I hope to help you, if you have any questions please give me a message, small series will promptly reply to everyone. Here also thank you very much for the cloud Habitat Community website support!

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.