<?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"/>&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!