<?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>
    <properties resource="db.properties"/>
    <context id="default" targetRuntime="MyBatis3Simple">
        <!--不添加任何代码注释-->
        <commentGenerator>
            <property name="suppressAllComments" value="true"/>
        </commentGenerator>
        <!--配置jdbc-->
        <jdbcConnection driverClass="${db.driver}"
                        connectionURL="${db.url}"
                        userId="${db.user}"
                        password="${db.password}">
        </jdbcConnection>
        <javaTypeResolver>
            <property name="forceBigDecimals" value="false"/>
            <property name="useJSR310Types" value="false"/>
        </javaTypeResolver>
        <!--配置model生成器的属性-->
        <javaModelGenerator targetPackage="com.csnf.entity" targetProject="src\main\java">
            <property name="enableSubPackages" value="true"/>
            <property name="trimStrings" value="true"/>
        </javaModelGenerator>
        <sqlMapGenerator targetPackage="com.csnf.mapper" targetProject="src\main\java">
            <property name="enableSubPackages" value="true"/>
        </sqlMapGenerator>
        <!--配置生成器的客户端程序-->
        <javaClientGenerator type="XMLMAPPER" targetPackage="com.csnf.mapper" targetProject="src\main\java">
            <property name="enableSubPackages" value="true"/>
        </javaClientGenerator>
        <!--category表-->
        <table tableName="student" domainObjectName="Student">
            <property name="useActualColumnNames" value="true"/>
            <generatedKey column="id" sqlStatement="MySql" identity="true"/>
            <columnOverride column="name" jdbcType="VARCHAR" javaType="java.lang.String"/>
            <columnOverride column="sex" jdbcType="INTEGER" javaType="java.lang.Integer"/>
            <columnOverride column="phone" jdbcType="CHAR" javaType="java.lang.String"/>
        </table>
    </context>
</generatorConfiguration>