Blame view

zteits-job/src/main/resources/generator/generatorConfig.xml 2.53 KB
3a404b2a   zhaowg   空闲车位获取和推送
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
  <?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>
  
   <context id="DB2Tables" targetRuntime="MyBatis3">
      <plugin type="com.zteits.job.util.OverWriteIsMergeablePlugin" />
   	<!-- 自定义注释生成器  MybatisGeneratorCommon类为我自定义的继承CommentGenerator的类 -->
   	<commentGenerator type="com.zteits.job.util.MybatisGeneratorCommon">
   		<!--  关闭自动生成的注释  -->
  	    <property name="suppressAllComments" value="true" />
  	    <property name="suppressDate" value="true" />
  	    <property name="javaFileEncoding" value="UTF-8"/>
  	</commentGenerator>
   	<!-- 定义如何连接目标数据库 -->
83f7336e   zhaowg   增加方格地磁状态获取空闲车位数据推送
18
19
20
21
      <jdbcConnection driverClass="${park-datasource.driverClassName}"
                          connectionURL="${park-datasource.url}"
                          userId="${park-datasource.username}"
                          password="${park-datasource.password}">
3a404b2a   zhaowg   空闲车位获取和推送
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
      </jdbcConnection>
  	<!--  默认false,把JDBC DECIMAL 和 NUMERIC 类型解析为 Integer    
           true,把JDBC DECIMAL 和 NUMERIC 类型解析为java.math.BigDecimal    
           -->   
  	  <javaTypeResolver >   
  		 <property name="forceBigDecimals" value="true" />
  	  </javaTypeResolver> 
  	<!-- 指定生成 Java 模型对象所属的包 -->
      <javaModelGenerator targetPackage="com.zteits.job.domain" targetProject="zteits-job/src/main/java">
        <property name="enableSubPackages" value="false" />
        <property name="trimStrings" value="true" />
      </javaModelGenerator>
  	<!-- 指定生成 SQL 映射文件所属的包和的目标项目 -->
      <sqlMapGenerator targetPackage="mybatis.mapper"  targetProject="zteits-job/src/main/resources">
        <property name="enableSubPackages" value="false" />
      </sqlMapGenerator>
  	<!-- 指定目标包和目标项目生成的客户端接口和类 -->
      <javaClientGenerator type="XMLMAPPER" targetPackage="com.zteits.job.mapper"  targetProject="zteits-job/src/main/java">
        <property name="enableSubPackages" value="true" />
      </javaClientGenerator>
83f7336e   zhaowg   增加方格地磁状态获取空闲车位数据推送
42
      <table tableName="tp_p_freeberth_statistic_rule"
3a404b2a   zhaowg   空闲车位获取和推送
43
44
45
46
47
48
49
50
51
52
53
  			enableCountByExample="true" enableUpdateByExample="true"
  			enableDeleteByExample="true" enableSelectByExample="true"
  			selectByExampleQueryId="true">
      	<!-- 指定自动生成主键的属性 -->
      	<generatedKey column="id" sqlStatement="MySql" identity="true"></generatedKey>
      </table>
      
      
      
    </context>
  </generatorConfiguration>