# SQL-Sentinel **Repository Path**: kaikai99/sql-sentinel ## Basic Information - **Project Name**: SQL-Sentinel - **Description**: No description available - **Primary Language**: Java - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-01-30 - **Last Updated**: 2026-01-30 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # SQL-Sentinel MyBatis SQL 智能审计与优化平台。在代码开发与构建阶段批量扫描 Mapper XML,发现性能与规范问题并生成报告。 ## 模块结构 | 模块 | 说明 | |------|------| | **sentinel-types** | 共用异常处理、常量等 | | **sentinel-domain** | 各个领域:解析、规则、报告、应用服务(ScanService) | | **sentinel-infrastructure** | 基础层:MyBatis 解析、JSqlParser、规则实现、报告写出 | | **sentinel-api** | 对接外部接口:CLI 参数解析与执行(CliRunner),未来 REST 等 | | **sentinel-app** | 项目启动:组装并运行,Main 入口 | | **sentinel-trigger** | 内部触发、定时任务、事件消息等(预留) | ``` sql-sentinel/ ├── sentinel-types/ # 共用异常、常量 ├── sentinel-domain/ # 领域 + 应用服务 ├── sentinel-infrastructure/ # 解析、规则、报告实现 ├── sentinel-api/ # 对外接口(CLI) ├── sentinel-app/ # 启动入口(fat jar) └── sentinel-trigger/ # 定时/事件(预留) ``` ## 技术栈 - JDK 21、Maven 3.8+ - JSqlParser、SLF4J + Logback ## 构建与运行 需 **JDK 21** 与 Maven 3.8+。 ```bash # 编译 mvn clean compile # 打包(含 fat jar) mvn clean package -DskipTests # 运行 CLI java -jar sentinel-app/target/sql-sentinel-cli.jar -path ./src/main/resources/mapper ``` 每个 Mapper XML 同级目录下会生成 `*_audit.md` 报告。 ## 文档 - [产品规划](doc/prod-plan.md) - [实施规划](doc/impl-plan.md) ## License 见 [LICENSE](LICENSE)。