feat(评论服务): 实现评论服务基础框架
All checks were successful
test/timeline-server/pipeline/head This commit looks good

- 新增 CommentServiceImpl 实现评论相关功能
- 移除 StoryServiceClient 的熔断器配置
- 禁用 feign 熔断器配置并添加相关注释
This commit is contained in:
2026-02-26 10:24:41 +08:00
parent 7ef9e85e2d
commit f727ed5f9b
3 changed files with 96 additions and 2 deletions

View File

@@ -8,11 +8,12 @@ import org.springframework.web.bind.annotation.RequestParam;
* Story Service Feign Client
* 用于调用 timeline-story-service 的接口
*/
@FeignClient(name = "timeline-story-service", path = "/story", fallbackFactory = StoryServiceClientFallbackFactory.class)
@FeignClient(name = "timeline-story-service", path = "/story")
public interface StoryServiceClient {
/**
* 统计用户的故事数量
*
* @param userId 用户ID
* @return 故事数量
*/
@@ -21,6 +22,7 @@ public interface StoryServiceClient {
/**
* 统计用户的照片/视频数量story_item
*
* @param userId 用户ID
* @return 照片/视频数量
*/
@@ -29,6 +31,7 @@ public interface StoryServiceClient {
/**
* 统计用户的存储使用量(字节)
*
* @param userId 用户ID
* @return 存储字节数
*/

View File

@@ -62,4 +62,5 @@ spring.datasource.hikari.keepalive-time=0
spring.datasource.hikari.validation-timeout=5000
# Feign Client Configuration
feign.circuitbreaker.enabled=true
# 注意:启用熔断器需要添加 resilience4j 或 hystrix 依赖
# feign.circuitbreaker.enabled=true