idea generator自动生成代码

<?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>
    <!--jdbc 驱动包,等-->
    <!--<classPathEntry location="/Program Files/IBM/SQLLIB/java/db2java.zip" />-->

    <context id="sss" targetRuntime="MyBatis3Simple">

        <commentGenerator>
            <property name="suppressAllComments" value="true" />
        </commentGenerator>

        <jdbcConnection driverClass="org.mariadb.jdbc.Driver"
                        connectionURL="jdbc:mariadb://localhost:3308/swagger"
                        userId="root"
                        password="990801">
        </jdbcConnection>

        <javaModelGenerator targetPackage="com.lij.entity" targetProject="src/main/java">
            <property name="trimStrings" value="true" />
        </javaModelGenerator>

        <sqlMapGenerator targetPackage="mappers"  targetProject="src/main/resources">
        </sqlMapGenerator>

        <javaClientGenerator type="XMLMAPPER" targetPackage="com.lij.dao"  targetProject="src/main/java">
        </javaClientGenerator>

        <table tableName="%">
            <property name="useActualColumnNames" value="true"/>
        </table>
    </context>
</generatorConfiguration>

 

posted @ 2018-11-06 10:51  Li【军】  阅读(1410)  评论(0编辑  收藏  举报