<?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="application.yml"/>

	<!-- 
		MyBatis3: 将会在Mapper里生成增删改查的代码
		MyBatis3Simple: 不会生成sample动态代码
	 -->
    <context id="Mysql" targetRuntime="MyBatis3Simple" defaultModelType="flat">
    	
        <property name="beginningDelimiter" value="`"/>
        <property name="endingDelimiter" value="`"/>

        <plugin type="tk.mybatis.mapper.generator.MapperPlugin">
            <property name="mappers" value="com.nbclass.util.MyMapper"/>
        </plugin>

		<commentGenerator>
 			<property name="suppressDate" value="true"/> <!-- 去掉生成日期那行注释 -->
        	<property name="suppressAllComments" value="true" /> <!-- 去掉所有的注释 -->
        </commentGenerator>

		<!-- 
        <jdbcConnection driverClass="${druid.driver-class}"
                        connectionURL="${druid.url}"
                        userId="${druid.username}"
                        password="${druid.password}">
        </jdbcConnection>
        -->
		<jdbcConnection driverClass="com.mysql.cj.jdbc.Driver"
                        connectionURL="jdbc:mysql://120.25.121.117:3306/oa_easyui?autoReconnect=true&amp;useUnicode=true&amp;useSSL=false&amp;serverTimezone=GMT%2B8&amp;characterEncoding=UTF-8"
                        userId="root"
                        password="szxgl@2001B">
			<property name="nullCatalogMeansCurrent" value="true"/>
        </jdbcConnection>

        <javaModelGenerator targetPackage="com.nbclass.szxgl.model" targetProject="src/main/java"/>

        <sqlMapGenerator targetPackage="mapper/szxgl" targetProject="src/main/resources"/>
		
        <javaClientGenerator targetPackage="com.nbclass.szxgl.mapper" targetProject="src/main/java" type="XMLMAPPER"/>
		<!-- 
        <table tableName="news" domainObjectName="News">
            <property name="useActualColumnNames" value="true" />  true:完全与数据库列名命名一样, false:使用驼峰命名方式
            <generatedKey column="id" sqlStatement="Mysql" identity="true"/>
        </table>
   		-->
   		
        <table tableName="sy_users" domainObjectName="SyUsers">
            <property name="useActualColumnNames" value="false" /><!-- 默认值，不根据列名，使用驼峰命名 -->
        </table>
        
    </context>
</generatorConfiguration>