代码提交

This commit is contained in:
张家训
2026-06-05 14:12:33 +08:00
parent 79506c16fa
commit 484c84d6e2
17 changed files with 428 additions and 889 deletions
@@ -0,0 +1,35 @@
package com.example.workutils.tool;
import java.util.Scanner;
/**
* 工具策略接口
* 所有可插拔工具实现此接口,Spring自动发现Tool Bean
*/
public interface Tool {
/**
* 工具唯一标识(用于配置启用/禁用)
* 示例: "scan", "mybatis", "batch", "git-health", "mybatis-generator"
*/
String getId();
/**
* 菜单显示名称
* 示例: "关键词扫描", "MyBatis导出"
*/
String getName();
/**
* 子菜单选项
* 返回空数组表示无子菜单
*/
String[] getMenuOptions();
/**
* 执行工具的交互会话
*
* @param scanner 控制台输入
*/
void execute(Scanner scanner);
}