refactor(search):重构搜索服务模块结构

- 将 han-note-search 模块拆分为 han-note-search-api 和 han-note-search-biz
- 调整包路径,统一添加 biz 子包以区分业务实现
- 更新相关类的导入路径以适配新的包结构
- 修改 Maven 模块配置,设置父模块打包方式为 pom- 添加新的 API 模块用于 RPC 接口定义
- 更新依赖配置,确保模块间正确引用
- 调整 IDEA 编译器配置以识别新模块
- 更新 HTTP 客户端测试数据和请求示例
- 添加 Feign 客户端支持以实现服务间通信
- 实现笔记文档重建功能并提供对外接口
- 增加数据对齐服务中远程调用搜索服务的能力
- 更新全局异常处理器和枚举类的包路径
- 调整应用启动类的 Mapper 扫描路径
- 更新 Elasticsearch 配置类和索引相关类路径
- 修改控制器和服务接口以支持新架构
- 更新测试类路径以匹配新的项目结构
This commit is contained in:
2025-11-03 16:00:22 +08:00
parent 218f4c6974
commit 2b2cd2be70
52 changed files with 512 additions and 181 deletions

View File

@@ -8,96 +8,17 @@
<version>${revision}</version>
</parent>
<!-- 指定打包方式 -->
<packaging>jar</packaging>
<!-- 多模块项目需要配置打包方式为 pom -->
<packaging>pom</packaging>
<modules>
<module>han-note-search-biz</module>
<module>han-note-search-api</module>
</modules>
<artifactId>han-note-search</artifactId>
<!-- 项目名称 -->
<name>${project.artifactId}</name>
<!-- 项目描述 -->
<description>搜索服务</description>
<dependencies>
<dependency>
<groupId>com.hanserwei</groupId>
<artifactId>hanserwei-common</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<!-- 业务接口日志组件 -->
<dependency>
<groupId>com.hanserwei</groupId>
<artifactId>hanserwei-spring-boot-starter-biz-operationlog</artifactId>
</dependency>
<!-- Jackson 组件 -->
<dependency>
<groupId>com.hanserwei</groupId>
<artifactId>hanserwei-spring-boot-starter-jackson</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-bootstrap</artifactId>
</dependency>
<!-- 服务注册发现 -->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
<!-- Elasticsearch 分布式搜索引擎 -->
<dependency>
<groupId>co.elastic.clients</groupId>
<artifactId>elasticsearch-java</artifactId>
</dependency>
<dependency>
<groupId>org.elasticsearch.client</groupId>
<artifactId>elasticsearch-rest-client</artifactId>
</dependency>
<!-- Canal -->
<dependency>
<groupId>com.alibaba.otter</groupId>
<artifactId>canal.client</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.otter</groupId>
<artifactId>canal.common</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.otter</groupId>
<artifactId>canal.protocol</artifactId>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-spring-boot3-starter</artifactId>
</dependency>
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
</dependency>
<!-- Druid 数据库连接池 -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-3-starter</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>