444f8cd015
fix: 修复知识图谱模块 P0/P1/P2/P3 问题
...
【P0 - 安全风险修复】
- InternalTokenInterceptor: fail-open → fail-closed
- 未配置 token 时直接拒绝(401)
- 仅 dev/test 环境可显式跳过校验
- KnowledgeGraphProperties: 新增 skipTokenCheck 配置项
- application-knowledgegraph.yml: 新增 skip-token-check 配置
【P1 - 文档版本控制】
- .gitignore: 移除 docs/knowledge-graph/ 忽略规则
- schema 文档现已纳入版本控制
【P2 - 代码质量改进】
- InternalTokenInterceptor: 错误响应改为 Response.error() 格式
- 新增 InternalTokenInterceptorTest.java(7 个测试用例)
- fail-closed 行为验证
- token 校验逻辑验证
- 错误响应格式验证
【P3 - 文档一致性】
- README.md: 相对链接改为显式 GitHub 链接
【验证结果】
- 编译通过
- 198 个测试全部通过(0 failures)
2026-02-19 13:03:42 +08:00
5a553ddde3
feat(knowledge-graph): 实现知识图谱基础设施搭建
...
实现功能:
- Neo4j Docker Compose 配置(社区版,端口 7474/7687,数据持久化)
- Makefile 新增 Neo4j 命令(neo4j-up/down/logs/shell)
- knowledge-graph-service Spring Boot 服务(完整的 DDD 分层架构)
- kg_extraction Python 模块(基于 LangChain LLMGraphTransformer)
技术实现:
- Neo4j 配置:环境变量化密码,统一默认值 datamate123
- Java 服务:
- Domain: GraphEntity, GraphRelation 实体模型
- Repository: Spring Data Neo4j,支持 graphId 范围查询
- Service: 业务逻辑,graphId 双重校验,查询限流
- Controller: REST API,UUID 格式校验
- Exception: 实现 ErrorCode 接口,统一异常体系
- Python 模块:
- KnowledgeGraphExtractor 类
- 支持异步/同步/批量抽取
- 支持 schema-guided 模式
- 兼容 OpenAI 及自部署模型
关键设计:
- graphId 权限边界:所有实体操作都在正确的 graphId 范围内
- 查询限流:depth 和 limit 参数受配置约束
- 异常处理:统一使用 BusinessException + ErrorCode
- 凭据管理:环境变量化,避免硬编码
- 双重防御:Controller 格式校验 + Service 业务校验
代码审查:
- 经过 3 轮 Codex 审查和 2 轮 Claude 修复
- 所有 P0 和 P1 问题已解决
- 编译通过,无阻塞性问题
文件变更:
- 新增:Neo4j 配置、knowledge-graph-service(11 个 Java 文件)、kg_extraction(3 个 Python 文件)
- 修改:Makefile、pom.xml、application.yml、pyproject.toml
2026-02-17 20:42:55 +08:00
4fa0ac1df4
config(security): 禁用安全配置中的frameOptions以允许iframe嵌入
...
- 在SecurityFilterChain中添加headers配置
- 禁用frameOptions以解决iframe嵌入限制问题
- 保持csrf禁用和其他现有安全设置不变
2026-01-31 13:57:38 +08:00
Dallas98
e300d13c21
feat: Enhance dataset file management with improved file copying
2025-11-14 23:30:28 +08:00
Dallas98
15498f27cf
feat: add file copying functionality to dataset directory and update base path configuration #80
2025-11-13 16:52:14 +08:00
Dallas98
aa01f52535
合并拉取请求 #74
...
* feat: Implement system parameter management with Redis integration
2025-11-11 22:13:14 +08:00
hhhhsc701
f3958f08d9
feature: 对接deer-flow ( #54 )
...
feature: 对接deer-flow
2025-11-04 20:30:40 +08:00
Dallas98
e854a0288a
feat: update knowledge base processing to use KnowledgeBase object and enhance configuration ( #46 )
...
* feat: update knowledge base processing to use KnowledgeBase object and enhance configuration
2025-10-31 13:16:05 +08:00
Dallas98
8d2b41ed94
feature: Implement the basic knowledge generation function ( #40 )
2025-10-30 16:50:54 +08:00
Dallas98
a4b5238621
refactor: simplify package scanning by using wildcard for mapper packages ( #28 )
...
* refactor: rename artifactId and application name to 'datamate'; add model configuration and related services
* refactor: simplify package scanning by using wildcard for mapper packages
2025-10-28 14:12:44 +08:00
Dallas98
f54afddbeb
refactor: rename artifactId and application name to 'datamate'; add model configuration and related services ( #26 )
2025-10-28 10:39:26 +08:00
hhhhsc
2d2419205a
refactor: rename and reorganize data models and repositories for clarity
2025-10-24 15:33:46 +08:00
hhhhsc701
31ef8bc265
[Feature] Refactor project to use 'datamate' naming convention for services and configurations ( #14 )
...
* Enhance CleaningTaskService to track cleaning process progress and update ExecutorType to DATAMATE
* Refactor project to use 'datamate' naming convention for services and configurations
2025-10-22 17:53:16 +08:00
Dallas98
1c97afed7d
init datamate
2025-10-21 23:00:48 +08:00