generatorConfig.xml 1.86 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>
	<!--数据库驱动 maven 已加载
	<classPathEntry location="mysql-connector-java-5.1.38.jar" />
	-->
	<context id="Mysql-Portal-Tables" targetRuntime="MyBatis3">
		<commentGenerator>
			<property name="suppressAllComments" value="true" />
		</commentGenerator>
		 <!--数据库链接地址账号密码-->
		<jdbcConnection driverClass="com.mysql.jdbc.Driver"
			connectionURL="jdbc:mysql://192.168.15.83:3083/portal"
			userId="runsa" password="runsa&amp;123">
		</jdbcConnection>
		<javaTypeResolver>
			<property name="forceBigDecimals" value="false" />
		</javaTypeResolver>
		 <!--生成entity类存放位置-->
		<javaModelGenerator targetPackage="cn.runsa.portal.base.entity" targetProject="src/main/java">
			<property name="enableSubPackages" value="true" />
			<property name="trimStrings" value="true" />
		</javaModelGenerator>
		<!--生成映射文件存放位置-->
		<sqlMapGenerator targetPackage="mybatis.mysql" targetProject="src/main/resources">
			<property name="enableSubPackages" value="true" />
		</sqlMapGenerator>
		 <!--生成Dao类存放位置-->
		<javaClientGenerator type="XMLMAPPER"
			targetPackage="cn.runsa.portal.base.dao" targetProject="src/main/java">
			<property name="enableSubPackages" value="true" />
		</javaClientGenerator>
		<!-- 表-->
		<table tableName="smUsers" domainObjectName="Users" 
			enableCountByExample="false" enableUpdateByExample="false" 
			enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false">
			<generatedKey column="usId" sqlStatement="MySql" identity="true"/>
			<columnRenamingRule searchString="us|pt"/>
		</table>
		 
	</context>

</generatorConfiguration>