mybatis generator配置文件示例:java
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN" "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd"> <generatorConfiguration> <classPathEntry location="C:\Users\peter.wang\.m2\repository\org\mariadb\jdbc\mariadb-java-client\1.4.5\mariadb-java-client-1.4.5.jar" /> <context id="context1"> <jdbcConnection connectionURL="jdbc:mariadb://192.168.0.18:3306/dbname" driverClass="org.mariadb.jdbc.Driver" password="password" userId="username" /> <javaModelGenerator targetPackage="com.mumu.model" targetProject="projectName" /> <sqlMapGenerator targetPackage="com.mumu.mapper" targetProject="projectName" /> <javaClientGenerator targetPackage="com.mumu.mapper" targetProject="projectName" type="XMLMAPPER" /> <table schema="dbname" tableName="t_user" domainObjectName="User" enableDeleteByExample="false" enableCountByExample="false" enableUpdateByExample="false" enableSelectByExample="false" > <property name="useActualColumnNames" value="true"/> </table> </context> </generatorConfiguration>