fanxing-query.xml 3.15 KB
<?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="libs/mysql-connector-java-8.0.25.jar"/>
	<context id="DB2Tables"	targetRuntime="MyBatis3" defaultModelType="flat" >
		<property name="autoDelimitKeywords" value="true"/>
		<property name="xmlMergeable" value="false"/>
		<property name="endingDelimiter" value="`"/>
		<property name="beginningDelimiter" value="`"/>
		<property name="basePackage" value="com.viontech.fanxing.commons.base"/>

		<commentGenerator>
			<property name="suppressDate" value="true"/>
			<!-- 是否去除自动生成的注释 true:是 : false:否 -->
			<property name="suppressAllComments" value="true"/>
		</commentGenerator>
		<!--数据库链接URL,用户名、密码 -->
		<jdbcConnection driverClass="com.mysql.cj.jdbc.Driver"
						connectionURL="jdbc:mysql://192.168.9.233:3306/fanxing3" userId="root"
						password="123456"/>
		<javaTypeResolver>
			<property name="forceBigDecimals" value="false"/>
		</javaTypeResolver>
		<!-- 生成模型的包名和位置-->
		<javaModelGenerator targetPackage="com.viontech.fanxing.commons.model" targetProject="F:\mybatis-generator\fanxing-forward">
			<property name="enableSubPackages" value="true"/>
			<property name="trimStrings" value="true"/>
			<property name="rootClass" value="com.viontech.fanxing.commons.base.BaseModel"/>
		</javaModelGenerator>
		<!-- 生成映射文件的包名和位置-->
		<sqlMapGenerator targetPackage="com.viontech.fanxing.commons.mapping" targetProject="F:\mybatis-generator\fanxing-forward">
			<property name="enableSubPackages" value="true"/>
		</sqlMapGenerator>
		<!-- 生成DAO的包名和位置-->
		<javaClientGenerator type="XMLMAPPER" targetPackage="com.viontech.fanxing.query.mapper" targetProject="F:\mybatis-generator\fanxing-forward" >
			<property name="enableSubPackages" value="true"/>
			<property name="rootInterface" value="com.viontech.fanxing.commons.base.BaseMapper"/>
		</javaClientGenerator>

	
		<table delimitIdentifiers="true" tableName="d_behavior" alias="behavior" domainObjectName="Behavior">
			<generatedKey column="id" sqlStatement="JDBC"/>
		</table>
		<table delimitIdentifiers="true" tableName="d_flow_event" alias="flowEvent" domainObjectName="FlowEvent">
			<generatedKey column="id" sqlStatement="JDBC"/>
		</table>
		<table delimitIdentifiers="true" tableName="d_flow_data" alias="flowData" domainObjectName="FlowData">
			<generatedKey column="id" sqlStatement="JDBC"/>
		</table>
		<table delimitIdentifiers="true" tableName="d_traffic" alias="traffic" domainObjectName="Traffic">
			<generatedKey column="id" sqlStatement="JDBC"/>
		</table>
		<table delimitIdentifiers="true" tableName="d_traffic_face" alias="trafficFace" domainObjectName="TrafficFace">
			<generatedKey column="id" sqlStatement="JDBC"/>
		</table>
		<table delimitIdentifiers="true" tableName="d_export_data" alias="exportData" domainObjectName="ExportData">
			<generatedKey column="id" sqlStatement="JDBC"/>
		</table>
	</context>
</generatorConfiguration>