liuxiaolong
2019-05-09 0d1d88cdb668e75ea8609417ac18ae19947e9525
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?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="D:\apache-maven-3.3.3-bin\apache-maven-3.3.3\repository\mysql\mysql-connector-java\5.1.34\mysql-connector-java-5.1.34.jar"/>
    <context id="DB2Tables" targetRuntime="MyBatis3">
        <plugin type="cn.com.basic.base.Plugin.PaginationPlugin"></plugin>
        <commentGenerator>
            <property name="suppressDate" value="true"/>
            <property name="suppressAllComments" value="true"/>
        </commentGenerator>
        <!-- 数据库链接地址账号密码 -->
        <jdbcConnection driverClass="com.mysql.jdbc.Driver"
                        connectionURL="jdbc:mysql://10.23.5.1:3306/schoolmanager?characterEncoding=UTF-8"
                        userId="root" password="123456"/>
        <javaTypeResolver>
            <property name="forceBigDecimals" value="false"/>
        </javaTypeResolver>
        <!-- 生成Model类存放位置 -->
        <javaModelGenerator targetPackage="cn.com.basic.entity"
                            targetProject="basci_business\src\main\java">
            <property name="enableSubPackages" value="true"/>
            <property name="trimStrings" value="true"/>
            <property name="rootClass" value="BaseEntity"/>
        </javaModelGenerator>
        <!-- 生成映射文件存放位置 -->
        <sqlMapGenerator targetPackage="cn.com.basic.mapper"
                         targetProject="basci_business\src\main\java">
            <property name="enableSubPackages" value="true"/>
        </sqlMapGenerator>
 
        <javaClientGenerator type="XMLMAPPER" targetPackage="cn.com.basic.dao"
                             targetProject="basci_business\src\main\java">
            <property name="enableSubPackages" value="true"/>
            <property name="rootInterface" value="IBaseDao"/>
        </javaClientGenerator>
 
        <!-- 生成对应表及类名 -->
 
        <table tableName="re_safety_item_task" domainObjectName="SafetyItemTask"></table>
        <table tableName="t_safety_flow_history" domainObjectName="SafetyFlowHistory"></table>
        <table tableName="t_safety_inspection_item" domainObjectName="SafetyInspectionItem"></table>
        <table tableName="t_safety_publish_task" domainObjectName="SafetyPublishTask"></table>
           </context>
</generatorConfiguration>