<?xml version="1.0" encoding="UTF-8" ?> <configuration><!-- Configuration--> <!-- <properties resource="XXXXX.properties" /> Or use the properties configuration file to read the order priority of the order of the order of the order --> <properties><!-- Properties><!-- Properties--> <property name="driver" value="" /><!-- Sub-element configuration--><!-- The read order is the highest priority--> <property name="url" value="" /> <property name="username" value="" /> <property name="password" value="" /> </properties> <settings /><!-- Settings --> <typeAliases><!-- Type naming --> <typeAlias alias="role" , type="com.tops.XXX.XXX.XXX" /><!-- Custom alias--> </typeAliases> <typeHandlers><!-- Type handler--><!-- Usually used when using enum types --> <typeHandler handler="XXXX.StatusTypeHandler" /><!-- Custom enum types --> </typeHandlers> <objectFactory /><!-- Object factory --> <plugins /><!-- Plugins --> <environments><!-- Configuration environment --> <environment><!-- Environment variables--> <transactionManager /><!-- Things Manager--> <dataSource> <!-- Data Source--> <property name="driver" value="${driver}" /> <property name="url" value="${url}" /> <property name="username" value="${username}" /> <property name="password" value="${password}" /> </dataSource> </environments> <databaseIdProvider type="DB_VENDOR"><!-- Database vendor logo--><!-- DB_VENDOR is a policymaker that starts the internal registration of MyBatis. First, MyBatis will read your configuration into the Configuration class, call the getDatabaseProductName() method after connecting to the database to obtain the database information, and then use the configured name value to match it to get DatabaseId --> <property name="MySQL" value="mysql" /> <property name="SQL Server" value="sqlserver" /> <!-- <select parameterType="string" databaseId="mysql">sql statement</select> --> </databaseIdProvider> <mappers><!-- 4 ways to introduce mappers --> <mapper resource="com/learn/mapper/xxx.xml" /><!-- Import with file path --> <package name="com.learn.mapper" /><!-- Import with package name --> <mapper /><!-- Register references with class --> <mapper url="file:///src/mappers/com/learn/mapper/xxx.xml" /><!-- Import with xxx.xml--> </mappers> </configuration>The above is the MyBatis config.xml tag introduced to you by the editor. I hope it will be helpful to you. If you have any questions, please leave me a message and the editor will reply to you in time. Thank you very much for your support to Wulin.com website!