|
|
<?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">
|
|
|
<!-- <commentGenerator>-->
|
|
|
<!-- <property name="suppressAllComments" value="true"/>-->
|
|
|
<!-- </commentGenerator>-->
|
|
|
<!-- type值为自定义的MyCommentGenerator-->
|
|
|
<commentGenerator type="com.sztzjy.resource_center.util.MyCommentGenerator">
|
|
|
<!-- 是否去除自动生成的注释 true:是 : false:否 -->
|
|
|
<property name="suppressAllComments" value="false"/>
|
|
|
<property name="suppressDate" value="false"/>
|
|
|
<!-- 是否添加数据表中字段的注释 true:是 : false:否 -->
|
|
|
<property name="addRemarkComments" value="true"/>
|
|
|
<property name="nullCatalogMeansCurrent" value="true"/>
|
|
|
</commentGenerator>
|
|
|
|
|
|
<!-- 配置数据库连接信息 -->
|
|
|
<jdbcConnection driverClass="com.mysql.cj.jdbc.Driver"
|
|
|
connectionURL="jdbc:mysql://118.31.7.2:3306/resource_center" userId="root"
|
|
|
password="sztzjy2017">
|
|
|
<property name="useInformationSchema" value="true"/> <!--useInformationSchema 实体类上添加数据表的注释 -->
|
|
|
</jdbcConnection>
|
|
|
<!-- 配置实体类的位置 -->
|
|
|
<javaModelGenerator targetPackage="com.sztzjy.resource_center.entity" targetProject="src/main/java">
|
|
|
<!-- 生成的Java模型是否支持序列化 -->
|
|
|
<property name="enableSubPackages" value="true"/>
|
|
|
<property name="trimStrings" value="true"/>
|
|
|
</javaModelGenerator>
|
|
|
|
|
|
<!-- 配置Mapper XML文件的位置-->
|
|
|
<sqlMapGenerator targetPackage="mapper" targetProject="src/main/resources">
|
|
|
<property name="enableSubPackages" value="true"/>
|
|
|
</sqlMapGenerator>
|
|
|
|
|
|
<!-- 配置Mapper接口的位置 -->
|
|
|
<javaClientGenerator type="XMLMAPPER" targetPackage="com.sztzjy.resource_center.mapper"
|
|
|
targetProject="src/main/java">
|
|
|
<property name="enableSubPackages" value="true"/>
|
|
|
</javaClientGenerator>
|
|
|
<!-- 需要生成的表 -->
|
|
|
<!-- <table tableName="sys_case_question" domainObjectName="SysCaseQuestion" />-->
|
|
|
<!-- <table tableName="sys_case_question_step" domainObjectName="SysCaseQuestionStep" />-->
|
|
|
<!-- <table tableName="sys_model" domainObjectName="SysModel" />-->
|
|
|
<!-- <table tableName="sys_model_question" domainObjectName="SysModelQuestion" />-->
|
|
|
<!-- <table tableName="sys_objective_question" domainObjectName="SysObjectiveQuestion" />-->
|
|
|
<!-- <table tableName="sys_one_catalog" domainObjectName="SysOneCatalog" />-->
|
|
|
<!-- <table tableName="sys_resource" domainObjectName="SysResource" />-->
|
|
|
<table tableName="sys_resource_and_course" domainObjectName="SysResourceAndCourse" />
|
|
|
<!-- <table tableName="sys_resource_data" domainObjectName="SysResourceData" />-->
|
|
|
<!-- <table tableName="sys_school" domainObjectName="SysSchool" />-->
|
|
|
<!-- <table tableName="sys_three_catalog" domainObjectName="SysThreeCatalog" />-->
|
|
|
<table tableName="sys_topic_and_course" domainObjectName="SysTopicAndCourse" />
|
|
|
<!-- <table tableName="sys_two_catalog" domainObjectName="SysTwoCatalog" />-->
|
|
|
</context>
|
|
|
|
|
|
|
|
|
</generatorConfiguration> |