优化包路径

This commit is contained in:
张家训
2026-06-09 09:20:34 +08:00
parent f7c9a4c2fe
commit 55721b6eaf
27 changed files with 46 additions and 45 deletions
@@ -1,7 +1,7 @@
package com.example.workutils.biz.batch;
import com.example.workutils.biz.mybatis.MyBatisExportService;
import com.example.workutils.biz.scanner.ScannerService;
import com.example.workutils.biz.mybatis.service.MyBatisExportService;
import com.example.workutils.biz.scanner.service.ScannerService;
import com.example.workutils.system.tool.Tool;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@@ -1,6 +1,7 @@
package com.example.workutils.biz.git;
import com.example.workutils.biz.git.internal.GitCommandExecutor;
import com.example.workutils.biz.git.service.GitService;
import com.example.workutils.biz.git.service.internal.GitCommandExecutor;
import com.example.workutils.system.tool.Tool;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@@ -1,6 +1,6 @@
package com.example.workutils.biz.git;
package com.example.workutils.biz.git.service;
import com.example.workutils.biz.git.internal.GitCommandExecutor;
import com.example.workutils.biz.git.service.internal.GitCommandExecutor;
import java.util.List;
import java.util.Scanner;
@@ -1,8 +1,8 @@
package com.example.workutils.biz.git;
package com.example.workutils.biz.git.service;
import com.example.workutils.biz.git.internal.GitCommandExecutor;
import com.example.workutils.biz.git.internal.strategy.GitStrategyFactory;
import com.example.workutils.biz.git.model.GitCommand;
import com.example.workutils.biz.git.service.internal.GitCommandExecutor;
import com.example.workutils.biz.git.service.internal.strategy.GitStrategyFactory;
import com.example.workutils.biz.git.service.model.GitCommand;
import com.example.workutils.system.support.FileOperationService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@@ -1,4 +1,4 @@
package com.example.workutils.biz.git.config;
package com.example.workutils.biz.git.service.config;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
@@ -1,4 +1,4 @@
package com.example.workutils.biz.git.internal;
package com.example.workutils.biz.git.service.internal;
import lombok.extern.slf4j.Slf4j;
@@ -1,4 +1,4 @@
package com.example.workutils.biz.git.internal;
package com.example.workutils.biz.git.service.internal;
import lombok.extern.slf4j.Slf4j;
@@ -1,4 +1,4 @@
package com.example.workutils.biz.git.internal;
package com.example.workutils.biz.git.service.internal;
import lombok.extern.slf4j.Slf4j;
@@ -1,4 +1,4 @@
package com.example.workutils.biz.git.internal;
package com.example.workutils.biz.git.service.internal;
import lombok.extern.slf4j.Slf4j;
@@ -1,8 +1,8 @@
package com.example.workutils.biz.git.internal.strategy;
package com.example.workutils.biz.git.service.internal.strategy;
import com.example.workutils.biz.git.internal.GitCommandExecutor;
import com.example.workutils.biz.git.internal.GitRepositoryManager;
import com.example.workutils.biz.git.model.GitCommand;
import com.example.workutils.biz.git.service.internal.GitCommandExecutor;
import com.example.workutils.biz.git.service.internal.GitRepositoryManager;
import com.example.workutils.biz.git.service.model.GitCommand;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
@@ -1,8 +1,8 @@
package com.example.workutils.biz.git.internal.strategy;
package com.example.workutils.biz.git.service.internal.strategy;
import com.example.workutils.biz.git.internal.GitCommandExecutor;
import com.example.workutils.biz.git.internal.GitRepositoryManager;
import com.example.workutils.biz.git.model.GitCommand;
import com.example.workutils.biz.git.service.internal.GitCommandExecutor;
import com.example.workutils.biz.git.service.internal.GitRepositoryManager;
import com.example.workutils.biz.git.service.model.GitCommand;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
@@ -1,6 +1,6 @@
package com.example.workutils.biz.git.internal.strategy;
package com.example.workutils.biz.git.service.internal.strategy;
import com.example.workutils.biz.git.model.GitCommand;
import com.example.workutils.biz.git.service.model.GitCommand;
/**
* Git 命令策略接口
@@ -1,6 +1,6 @@
package com.example.workutils.biz.git.internal.strategy;
package com.example.workutils.biz.git.service.internal.strategy;
import com.example.workutils.biz.git.model.GitCommand;
import com.example.workutils.biz.git.service.model.GitCommand;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
@@ -1,4 +1,4 @@
package com.example.workutils.biz.git.model;
package com.example.workutils.biz.git.service.model;
import lombok.Data;
@@ -1,5 +1,6 @@
package com.example.workutils.biz.mybatis;
import com.example.workutils.biz.mybatis.service.MyBatisExportService;
import com.example.workutils.system.tool.Tool;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@@ -1,6 +1,6 @@
package com.example.workutils.biz.mybatis;
import com.example.workutils.biz.mybatis.generator.MyBatisGeneratorService;
import com.example.workutils.biz.mybatis.service.generator.MyBatisGeneratorService;
import com.example.workutils.system.tool.Tool;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@@ -1,7 +1,7 @@
package com.example.workutils.biz.mybatis;
package com.example.workutils.biz.mybatis.service;
import com.example.workutils.biz.mybatis.model.MybatisTag;
import com.example.workutils.biz.scanner.config.ScanConfig;
import com.example.workutils.biz.mybatis.service.model.MybatisTag;
import com.example.workutils.biz.scanner.service.config.ScanConfig;
import com.example.workutils.system.support.FileOperationService;
import com.example.workutils.system.support.OutputService;
import lombok.extern.slf4j.Slf4j;
@@ -1,4 +1,4 @@
package com.example.workutils.biz.mybatis.generator;
package com.example.workutils.biz.mybatis.service.generator;
import org.mybatis.generator.api.CommentGenerator;
import org.mybatis.generator.api.IntrospectedColumn;
@@ -1,10 +1,9 @@
package com.example.workutils.biz.mybatis.generator;
package com.example.workutils.biz.mybatis.service.generator;
import org.mybatis.generator.api.IntrospectedColumn;
import org.mybatis.generator.api.IntrospectedTable;
import org.mybatis.generator.api.PluginAdapter;
import org.mybatis.generator.api.dom.java.FullyQualifiedJavaType;
import org.mybatis.generator.api.dom.java.Interface;
import org.mybatis.generator.api.dom.java.Method;
import org.mybatis.generator.api.dom.java.TopLevelClass;
@@ -1,4 +1,4 @@
package com.example.workutils.biz.mybatis.generator;
package com.example.workutils.biz.mybatis.service.generator;
import lombok.extern.slf4j.Slf4j;
import org.mybatis.generator.api.MyBatisGenerator;
@@ -13,7 +13,6 @@ import java.sql.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Properties;
import java.util.regex.Pattern;
/**
* MyBatis逆向工程服务
@@ -1,4 +1,4 @@
package com.example.workutils.biz.mybatis.generator;
package com.example.workutils.biz.mybatis.service.generator;
import org.mybatis.generator.api.IntrospectedTable;
import org.mybatis.generator.api.PluginAdapter;
@@ -1,4 +1,4 @@
package com.example.workutils.biz.mybatis.model;
package com.example.workutils.biz.mybatis.service.model;
import lombok.Data;
@@ -1,5 +1,6 @@
package com.example.workutils.biz.scanner;
import com.example.workutils.biz.scanner.service.ScannerService;
import com.example.workutils.system.tool.Tool;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@@ -1,6 +1,6 @@
package com.example.workutils.biz.scanner;
package com.example.workutils.biz.scanner.service;
import com.example.workutils.biz.scanner.config.ScanConfig;
import com.example.workutils.biz.scanner.service.config.ScanConfig;
import com.example.workutils.system.config.WorkUtilsProperties;
import com.example.workutils.system.support.FileOperationService;
import com.example.workutils.system.support.OutputService;
@@ -1,4 +1,4 @@
package com.example.workutils.biz.scanner.config;
package com.example.workutils.biz.scanner.service.config;
import lombok.Data;
@@ -1,6 +1,6 @@
package com.example.workutils.system.support;
import com.example.workutils.biz.scanner.config.ScanConfig;
import com.example.workutils.biz.scanner.service.config.ScanConfig;
import com.example.workutils.system.config.WorkUtilsProperties;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
+3 -3
View File
@@ -12,11 +12,11 @@
<property name="replaceString" value="Criteria" />
</plugin>
<!-- 只保留Selective版本的方法 -->
<plugin type="com.example.workutils.biz.mybatis.generator.SelectiveOnlyPlugin" />
<plugin type="com.example.workutils.biz.mybatis.service.generator.SelectiveOnlyPlugin" />
<!-- 使用Lombok @Data注解,不生成getter/setter -->
<plugin type="com.example.workutils.biz.mybatis.generator.LombokPlugin" />
<plugin type="com.example.workutils.biz.mybatis.service.generator.LombokPlugin" />
<commentGenerator type="com.example.workutils.biz.mybatis.generator.CustomCommentGenerator">
<commentGenerator type="com.example.workutils.biz.mybatis.service.generator.CustomCommentGenerator">
<!-- 开启数据库字段的中文注释(保留表/字段备注) -->
<property name="addRemarkComments" value="true"/>
</commentGenerator>