已测试生成功能正常
This commit is contained in:
@@ -3,6 +3,7 @@ package com.example.workutils.menu.api;
|
||||
import com.example.workutils.menu.handler.AbstractMenuHandler;
|
||||
import com.example.workutils.menu.handler.BatchHandler;
|
||||
import com.example.workutils.menu.handler.GitHealthHandler;
|
||||
import com.example.workutils.menu.handler.MyBatisGeneratorHandler;
|
||||
import com.example.workutils.menu.handler.MyBatisHandler;
|
||||
import com.example.workutils.menu.handler.ScanHandler;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -34,15 +35,18 @@ public class MenuRunner {
|
||||
private final MyBatisHandler myBatisHandler;
|
||||
private final BatchHandler batchHandler;
|
||||
private final GitHealthHandler gitHealthHandler;
|
||||
private final MyBatisGeneratorHandler myBatisGeneratorHandler;
|
||||
|
||||
public MenuRunner(ScanHandler scanHandler,
|
||||
MyBatisHandler myBatisHandler,
|
||||
BatchHandler batchHandler,
|
||||
GitHealthHandler gitHealthHandler) {
|
||||
GitHealthHandler gitHealthHandler,
|
||||
MyBatisGeneratorHandler myBatisGeneratorHandler) {
|
||||
this.scanHandler = scanHandler;
|
||||
this.myBatisHandler = myBatisHandler;
|
||||
this.batchHandler = batchHandler;
|
||||
this.gitHealthHandler = gitHealthHandler;
|
||||
this.myBatisGeneratorHandler = myBatisGeneratorHandler;
|
||||
|
||||
// 初始化处理器实例映射
|
||||
initHandlerInstanceMap();
|
||||
@@ -58,6 +62,7 @@ public class MenuRunner {
|
||||
handlerInstanceMap.put(MyBatisHandler.class, myBatisHandler);
|
||||
handlerInstanceMap.put(BatchHandler.class, batchHandler);
|
||||
handlerInstanceMap.put(GitHealthHandler.class, gitHealthHandler);
|
||||
handlerInstanceMap.put(MyBatisGeneratorHandler.class, myBatisGeneratorHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -32,7 +32,7 @@ D:/bestpay-srdcloud/cf-consumestage-mall|NORMAL
|
||||
D:/bestpay-srdcloud/cf-credit-bizfront|CORRUPTED
|
||||
D:/bestpay-srdcloud/cf-credit-bizfront-plus|NORMAL
|
||||
D:/bestpay-srdcloud/cf-credit-front|NORMAL
|
||||
D:/bestpay-srdcloud/cf-credit-prod|CORRUPTED
|
||||
D:/bestpay-srdcloud/cf-credit-prod|NORMAL
|
||||
D:/bestpay-srdcloud/cf-credit-prod-batch|NORMAL
|
||||
D:/bestpay-srdcloud/cf-credit-prod-manage|NORMAL
|
||||
D:/bestpay-srdcloud/cf-creditstagescore|NORMAL
|
||||
@@ -41,10 +41,10 @@ D:/bestpay-srdcloud/cf-ctcorp-core|NORMAL
|
||||
D:/bestpay-srdcloud/cf-customer-core|NORMAL
|
||||
D:/bestpay-srdcloud/cf-file-core|CORRUPTED
|
||||
D:/bestpay-srdcloud/cf-govent-prod|CORRUPTED
|
||||
D:/bestpay-srdcloud/cf-grant-core|CORRUPTED
|
||||
D:/bestpay-srdcloud/cf-grant-core|NORMAL
|
||||
D:/bestpay-srdcloud/cf-info-collection|NORMAL
|
||||
D:/bestpay-srdcloud/cf-instalment-admin|CORRUPTED
|
||||
D:/bestpay-srdcloud/cf-instalment-batch|CORRUPTED
|
||||
D:/bestpay-srdcloud/cf-instalment-batch|NORMAL
|
||||
D:/bestpay-srdcloud/cf-instalment-mix|CORRUPTED
|
||||
D:/bestpay-srdcloud/cf-invoice-core|NORMAL
|
||||
D:/bestpay-srdcloud/cf-lending-management-core|NORMAL
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
db_driver=com.mysql.jdbc.Driver
|
||||
db_url=jdbc:mysql://localhost:3306/disburse?useUnicode=true&characterEncoding=utf8&useSSL=false
|
||||
db_username=root
|
||||
db_password=1Qaz@4772
|
||||
db_driver_path=D:/bestpay-maven/repository/mysql/mysql-connector-java/5.1.47/mysql-connector-java-5.1.47.jar
|
||||
|
||||
model_package=com.example.workutils.generator.model
|
||||
model_target_project=./src/main/java
|
||||
sqlmapper_package=mappers
|
||||
sqlmapper_target_project=./src/main/resources
|
||||
dao_package=com.example.workutils.generator.mapper
|
||||
dao_target_project=./src/main/java
|
||||
@@ -0,0 +1,65 @@
|
||||
<?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="mybatis-generator.properties" />
|
||||
<!-- classPathEntry:数据库的JDBC驱动 -->
|
||||
<classPathEntry location="${db_driver_path}" />
|
||||
<context id="OracleTables" targetRuntime="MyBatis3">
|
||||
<property name="javaFileEncoding" value="UTF-8"/>
|
||||
<plugin type="org.mybatis.generator.plugins.CaseInsensitiveLikePlugin" />
|
||||
<plugin type="org.mybatis.generator.plugins.RenameExampleClassPlugin">
|
||||
<property name="searchString" value="Example$" />
|
||||
<property name="replaceString" value="Criteria" />
|
||||
</plugin>
|
||||
|
||||
<commentGenerator>
|
||||
<!-- 1. 关闭所有默认的注释生成(英文说明、生成器标记) -->
|
||||
<property name="suppressAllComments" value="false"/>
|
||||
<!-- 2. 开启数据库字段的中文注释(保留表/字段备注) -->
|
||||
<property name="addRemarkComments" value="true"/>
|
||||
<!-- 3. 去掉日期信息 -->
|
||||
<property name="suppressDate" value="true"/>
|
||||
<!-- 4. 【关键】禁用 Legacy 模式,让它只生成字段备注 -->
|
||||
<property name="useLegacyCommentGenerator" value="false"/>
|
||||
<!-- 5. 去掉 @mbg.generated 标记 -->
|
||||
<property name="disableCommentAnnotation" value="true"/>
|
||||
</commentGenerator>
|
||||
|
||||
<!--数据库连接信息。 -->
|
||||
<jdbcConnection driverClass="${db_driver}" connectionURL="${db_url}" userId="${db_username}" password="${db_password}" />
|
||||
<javaTypeResolver>
|
||||
<property name="forceBigDecimals" value="false" />
|
||||
</javaTypeResolver>
|
||||
|
||||
<!-- 配置 Java 模型生成器 -->
|
||||
<javaModelGenerator targetPackage="${model_package}" targetProject="${model_target_project}">
|
||||
<property name="enableSubPackages" value="true" />
|
||||
<property name="trimStrings" value="true" />
|
||||
<!-- <property name="rootClass" value="com.bestpay.ft.compensatory.core.dal.dataobject.BaseNewWorldPO"/>-->
|
||||
<!-- overwrite:是否覆盖已经生成的文件 -->
|
||||
<property name="overwrite" value="true"/>
|
||||
</javaModelGenerator>
|
||||
|
||||
<!-- 配置 SQL 映射生成器 -->
|
||||
<sqlMapGenerator targetPackage="${sqlmapper_package}" targetProject="${sqlmapper_target_project}">
|
||||
<property name="enableSubPackages" value="true" />
|
||||
<!-- overwrite:是否覆盖已经生成的文件 -->
|
||||
<property name="overwrite" value="true"/>
|
||||
</sqlMapGenerator>
|
||||
|
||||
<!-- 配置 Java 客户端生成器 -->
|
||||
<javaClientGenerator targetPackage="${dao_package}" targetProject="${dao_target_project}" type="XMLMAPPER">
|
||||
<property name="enableSubPackages" value="true" />
|
||||
<!-- overwrite:是否覆盖已经生成的文件 -->
|
||||
<property name="overwrite" value="true"/>
|
||||
</javaClientGenerator>
|
||||
|
||||
<!-- 生成文件demo!! -->
|
||||
<table schema="" tableName="trade_loan_disburse_commit_evt"
|
||||
domainObjectName="TradeLoanDisburseCommitEvtPO"
|
||||
enableCountByExample="false" enableUpdateByExample="false"
|
||||
enableDeleteByExample="false" enableSelectByExample="false"
|
||||
selectByExampleQueryId="false"/>
|
||||
|
||||
</context>
|
||||
</generatorConfiguration>
|
||||
Reference in New Issue
Block a user