generatorConfig.xml 1.9 KB
<!DOCTYPE generatorConfiguration
        PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
        "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
<generatorConfiguration>

    <context id="Mysql" targetRuntime="MyBatis3Simple" defaultModelType="flat">

        <property name="javaFileEncoding" value="UTF-8"/>
        <property name="useMapperCommentGenerator" value="true"/>

        <plugin type="tk.mybatis.mapper.generator.MapperPlugin">
            <!-- 配置后生成的 Mapper 接口都会自动继承接口 value: 需要继承的接口, 该接口不可以在 MapperScan 扫描范围中-->
            <property name="mappers" value="com.viontech.label.platform.util.MyMapper"/>
            <!-- caseSensitive默认false,当数据库表名区分大小写时,可以将该属性设置为true -->
            <property name="caseSensitive" value="true"/>
            <property name="forceAnnotation" value="true"/>
        </plugin>


        <!-- 数据库连接属性: -->
        <jdbcConnection
                driverClass="org.postgresql.Driver"
                connectionURL="jdbc:postgresql://192.168.1.106:5432/vion_label"
                userId="postgres"
                password="vion"/>

        <!-- MyBatis 生成器生成 Model -->
        <javaModelGenerator targetPackage="com.viontech.label.platform.model"
                            targetProject="src/main/java"/>

        <!-- MyBatis 生成器生成 Mapper XML -->
        <sqlMapGenerator targetPackage="com.viontech.label.platform.mapping"
                         targetProject="src/main/java"/>

        <!-- MyBatis 生成器生成 Mapper class -->
        <javaClientGenerator targetPackage="com.viontech.label.platform.mapper"
                             targetProject="src/main/java"
                             type="XMLMAPPER"/>

        <table tableName="s_forbidden_user"></table>
    </context>
</generatorConfiguration>