chore: reorganize package structure for content stats updater (#6699)

#### What type of PR is this?
/milestone 2.20.x
/area core

#### What this PR does / why we need it:
将内容管理相关的数据更新类归档到 content 包下,如访问量和评论量统计

#### Does this PR introduce a user-facing change?
```release-note
None
```
pull/6703/head^2
guqing 2024-09-28 18:43:42 +08:00 committed by GitHub
parent a1fcd51714
commit a53aa786e1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
26 changed files with 38 additions and 36 deletions

View File

@ -5,14 +5,14 @@ import lombok.RequiredArgsConstructor;
import org.springframework.security.core.context.ReactiveSecurityContextHolder; import org.springframework.security.core.context.ReactiveSecurityContextHolder;
import org.springframework.util.Assert; import org.springframework.util.Assert;
import reactor.core.publisher.Mono; import reactor.core.publisher.Mono;
import run.halo.app.core.counter.CounterService;
import run.halo.app.core.counter.MeterUtils;
import run.halo.app.core.extension.User; import run.halo.app.core.extension.User;
import run.halo.app.core.extension.content.Comment; import run.halo.app.core.extension.content.Comment;
import run.halo.app.core.extension.content.Reply; import run.halo.app.core.extension.content.Reply;
import run.halo.app.core.user.service.RoleService; import run.halo.app.core.user.service.RoleService;
import run.halo.app.core.user.service.UserService; import run.halo.app.core.user.service.UserService;
import run.halo.app.extension.ReactiveExtensionClient; import run.halo.app.extension.ReactiveExtensionClient;
import run.halo.app.metrics.CounterService;
import run.halo.app.metrics.MeterUtils;
import run.halo.app.security.authorization.AuthorityUtils; import run.halo.app.security.authorization.AuthorityUtils;
@RequiredArgsConstructor @RequiredArgsConstructor

View File

@ -16,6 +16,7 @@ import org.springframework.util.Assert;
import reactor.core.publisher.Flux; import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono; import reactor.core.publisher.Mono;
import reactor.util.retry.Retry; import reactor.util.retry.Retry;
import run.halo.app.core.counter.CounterService;
import run.halo.app.core.extension.content.Comment; import run.halo.app.core.extension.content.Comment;
import run.halo.app.core.user.service.RoleService; import run.halo.app.core.user.service.RoleService;
import run.halo.app.core.user.service.UserService; import run.halo.app.core.user.service.UserService;
@ -29,7 +30,6 @@ import run.halo.app.extension.Ref;
import run.halo.app.extension.router.selector.FieldSelector; import run.halo.app.extension.router.selector.FieldSelector;
import run.halo.app.infra.SystemConfigurableEnvironmentFetcher; import run.halo.app.infra.SystemConfigurableEnvironmentFetcher;
import run.halo.app.infra.exception.AccessDeniedException; import run.halo.app.infra.exception.AccessDeniedException;
import run.halo.app.metrics.CounterService;
import run.halo.app.plugin.extensionpoint.ExtensionGetter; import run.halo.app.plugin.extensionpoint.ExtensionGetter;
/** /**

View File

@ -20,6 +20,7 @@ import org.springframework.util.Assert;
import reactor.core.publisher.Flux; import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono; import reactor.core.publisher.Mono;
import reactor.util.retry.Retry; import reactor.util.retry.Retry;
import run.halo.app.core.counter.CounterService;
import run.halo.app.core.extension.content.Comment; import run.halo.app.core.extension.content.Comment;
import run.halo.app.core.extension.content.Reply; import run.halo.app.core.extension.content.Reply;
import run.halo.app.core.user.service.RoleService; import run.halo.app.core.user.service.RoleService;
@ -31,7 +32,6 @@ import run.halo.app.extension.PageRequestImpl;
import run.halo.app.extension.ReactiveExtensionClient; import run.halo.app.extension.ReactiveExtensionClient;
import run.halo.app.extension.router.selector.FieldSelector; import run.halo.app.extension.router.selector.FieldSelector;
import run.halo.app.infra.exception.RequestRestrictedException; import run.halo.app.infra.exception.RequestRestrictedException;
import run.halo.app.metrics.CounterService;
/** /**
* A default implementation of {@link ReplyService}. * A default implementation of {@link ReplyService}.

View File

@ -30,6 +30,8 @@ import run.halo.app.content.PostQuery;
import run.halo.app.content.PostRequest; import run.halo.app.content.PostRequest;
import run.halo.app.content.PostService; import run.halo.app.content.PostService;
import run.halo.app.content.Stats; import run.halo.app.content.Stats;
import run.halo.app.core.counter.CounterService;
import run.halo.app.core.counter.MeterUtils;
import run.halo.app.core.extension.content.Category; import run.halo.app.core.extension.content.Category;
import run.halo.app.core.extension.content.Post; import run.halo.app.core.extension.content.Post;
import run.halo.app.core.extension.content.Snapshot; import run.halo.app.core.extension.content.Snapshot;
@ -43,8 +45,6 @@ import run.halo.app.extension.Ref;
import run.halo.app.extension.router.selector.FieldSelector; import run.halo.app.extension.router.selector.FieldSelector;
import run.halo.app.infra.Condition; import run.halo.app.infra.Condition;
import run.halo.app.infra.ConditionStatus; import run.halo.app.infra.ConditionStatus;
import run.halo.app.metrics.CounterService;
import run.halo.app.metrics.MeterUtils;
/** /**
* A default implementation of {@link PostService}. * A default implementation of {@link PostService}.

View File

@ -25,6 +25,8 @@ import run.halo.app.content.SinglePageQuery;
import run.halo.app.content.SinglePageRequest; import run.halo.app.content.SinglePageRequest;
import run.halo.app.content.SinglePageService; import run.halo.app.content.SinglePageService;
import run.halo.app.content.Stats; import run.halo.app.content.Stats;
import run.halo.app.core.counter.CounterService;
import run.halo.app.core.counter.MeterUtils;
import run.halo.app.core.extension.content.Post; import run.halo.app.core.extension.content.Post;
import run.halo.app.core.extension.content.SinglePage; import run.halo.app.core.extension.content.SinglePage;
import run.halo.app.core.extension.content.Snapshot; import run.halo.app.core.extension.content.Snapshot;
@ -34,8 +36,6 @@ import run.halo.app.extension.ReactiveExtensionClient;
import run.halo.app.extension.Ref; import run.halo.app.extension.Ref;
import run.halo.app.infra.Condition; import run.halo.app.infra.Condition;
import run.halo.app.infra.ConditionStatus; import run.halo.app.infra.ConditionStatus;
import run.halo.app.metrics.CounterService;
import run.halo.app.metrics.MeterUtils;
/** /**
* Single page service implementation. * Single page service implementation.

View File

@ -1,4 +1,4 @@
package run.halo.app.metrics; package run.halo.app.content.stats;
import java.time.Duration; import java.time.Duration;
import java.time.Instant; import java.time.Instant;

View File

@ -1,4 +1,4 @@
package run.halo.app.metrics; package run.halo.app.content.stats;
import static org.apache.commons.lang3.ObjectUtils.defaultIfNull; import static org.apache.commons.lang3.ObjectUtils.defaultIfNull;
import static run.halo.app.extension.index.query.QueryFactory.and; import static run.halo.app.extension.index.query.QueryFactory.and;

View File

@ -1,4 +1,4 @@
package run.halo.app.content; package run.halo.app.content.stats;
import static org.apache.commons.lang3.ObjectUtils.defaultIfNull; import static org.apache.commons.lang3.ObjectUtils.defaultIfNull;
import static run.halo.app.extension.index.query.QueryFactory.and; import static run.halo.app.extension.index.query.QueryFactory.and;
@ -12,6 +12,7 @@ import java.util.Set;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.context.event.EventListener; import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import run.halo.app.content.AbstractEventReconciler;
import run.halo.app.core.extension.content.Post; import run.halo.app.core.extension.content.Post;
import run.halo.app.core.extension.content.Tag; import run.halo.app.core.extension.content.Tag;
import run.halo.app.core.extension.content.Tag.TagStatus; import run.halo.app.core.extension.content.Tag.TagStatus;

View File

@ -1,4 +1,4 @@
package run.halo.app.metrics; package run.halo.app.content.stats;
import java.time.Duration; import java.time.Duration;
import java.time.Instant; import java.time.Instant;
@ -14,6 +14,7 @@ import org.springframework.context.event.EventListener;
import org.springframework.scheduling.annotation.Async; import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.Scheduled; import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import run.halo.app.core.counter.MeterUtils;
import run.halo.app.core.extension.Counter; import run.halo.app.core.extension.Counter;
import run.halo.app.event.post.VisitedEvent; import run.halo.app.event.post.VisitedEvent;
import run.halo.app.extension.ExtensionClient; import run.halo.app.extension.ExtensionClient;

View File

@ -1,4 +1,4 @@
package run.halo.app.metrics; package run.halo.app.content.stats;
import java.time.Duration; import java.time.Duration;
import java.time.Instant; import java.time.Instant;
@ -10,6 +10,7 @@ import org.springframework.context.SmartLifecycle;
import org.springframework.context.event.EventListener; import org.springframework.context.event.EventListener;
import org.springframework.scheduling.annotation.Async; import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import run.halo.app.core.counter.MeterUtils;
import run.halo.app.core.extension.Counter; import run.halo.app.core.extension.Counter;
import run.halo.app.event.post.DownvotedEvent; import run.halo.app.event.post.DownvotedEvent;
import run.halo.app.event.post.UpvotedEvent; import run.halo.app.event.post.UpvotedEvent;

View File

@ -1,4 +1,4 @@
package run.halo.app.metrics; package run.halo.app.core.counter;
import reactor.core.publisher.Mono; import reactor.core.publisher.Mono;
import run.halo.app.core.extension.Counter; import run.halo.app.core.extension.Counter;

View File

@ -1,4 +1,4 @@
package run.halo.app.metrics; package run.halo.app.core.counter;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import reactor.core.publisher.Mono; import reactor.core.publisher.Mono;

View File

@ -1,4 +1,4 @@
package run.halo.app.metrics; package run.halo.app.core.counter;
import io.micrometer.core.instrument.Counter; import io.micrometer.core.instrument.Counter;
import io.micrometer.core.instrument.MeterRegistry; import io.micrometer.core.instrument.MeterRegistry;

View File

@ -18,6 +18,7 @@ import org.springframework.lang.NonNull;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import run.halo.app.content.comment.ReplyNotificationSubscriptionHelper; import run.halo.app.content.comment.ReplyNotificationSubscriptionHelper;
import run.halo.app.content.comment.ReplyService; import run.halo.app.content.comment.ReplyService;
import run.halo.app.core.counter.MeterUtils;
import run.halo.app.core.extension.Counter; import run.halo.app.core.extension.Counter;
import run.halo.app.core.extension.content.Comment; import run.halo.app.core.extension.content.Comment;
import run.halo.app.core.extension.content.Constant; import run.halo.app.core.extension.content.Constant;
@ -36,7 +37,6 @@ import run.halo.app.extension.controller.ControllerBuilder;
import run.halo.app.extension.controller.Reconciler; import run.halo.app.extension.controller.Reconciler;
import run.halo.app.extension.index.query.Query; import run.halo.app.extension.index.query.Query;
import run.halo.app.extension.router.selector.FieldSelector; import run.halo.app.extension.router.selector.FieldSelector;
import run.halo.app.metrics.MeterUtils;
/** /**
* Reconciler for {@link Comment}. * Reconciler for {@link Comment}.

View File

@ -5,6 +5,7 @@ import static run.halo.app.extension.index.query.QueryFactory.startsWith;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.context.ApplicationEventPublisher; import org.springframework.context.ApplicationEventPublisher;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import run.halo.app.core.counter.MeterUtils;
import run.halo.app.core.extension.Counter; import run.halo.app.core.extension.Counter;
import run.halo.app.core.extension.content.Post; import run.halo.app.core.extension.content.Post;
import run.halo.app.event.post.PostStatsChangedEvent; import run.halo.app.event.post.PostStatsChangedEvent;
@ -14,7 +15,6 @@ import run.halo.app.extension.controller.Controller;
import run.halo.app.extension.controller.ControllerBuilder; import run.halo.app.extension.controller.ControllerBuilder;
import run.halo.app.extension.controller.Reconciler; import run.halo.app.extension.controller.Reconciler;
import run.halo.app.extension.router.selector.FieldSelector; import run.halo.app.extension.router.selector.FieldSelector;
import run.halo.app.metrics.MeterUtils;
@Component @Component
@RequiredArgsConstructor @RequiredArgsConstructor

View File

@ -39,6 +39,8 @@ import run.halo.app.content.NotificationReasonConst;
import run.halo.app.content.PostService; import run.halo.app.content.PostService;
import run.halo.app.content.comment.CommentService; import run.halo.app.content.comment.CommentService;
import run.halo.app.content.permalinks.PostPermalinkPolicy; import run.halo.app.content.permalinks.PostPermalinkPolicy;
import run.halo.app.core.counter.CounterService;
import run.halo.app.core.counter.MeterUtils;
import run.halo.app.core.extension.content.Constant; import run.halo.app.core.extension.content.Constant;
import run.halo.app.core.extension.content.Post; import run.halo.app.core.extension.content.Post;
import run.halo.app.core.extension.content.Post.PostPhase; import run.halo.app.core.extension.content.Post.PostPhase;
@ -65,8 +67,6 @@ import run.halo.app.extension.router.selector.FieldSelector;
import run.halo.app.infra.Condition; import run.halo.app.infra.Condition;
import run.halo.app.infra.ConditionStatus; import run.halo.app.infra.ConditionStatus;
import run.halo.app.infra.utils.HaloUtils; import run.halo.app.infra.utils.HaloUtils;
import run.halo.app.metrics.CounterService;
import run.halo.app.metrics.MeterUtils;
import run.halo.app.notification.NotificationCenter; import run.halo.app.notification.NotificationCenter;
import run.halo.app.plugin.extensionpoint.ExtensionGetter; import run.halo.app.plugin.extensionpoint.ExtensionGetter;

View File

@ -23,6 +23,8 @@ import run.halo.app.content.ExcerptGenerator;
import run.halo.app.content.NotificationReasonConst; import run.halo.app.content.NotificationReasonConst;
import run.halo.app.content.SinglePageService; import run.halo.app.content.SinglePageService;
import run.halo.app.content.comment.CommentService; import run.halo.app.content.comment.CommentService;
import run.halo.app.core.counter.CounterService;
import run.halo.app.core.counter.MeterUtils;
import run.halo.app.core.extension.content.Post; import run.halo.app.core.extension.content.Post;
import run.halo.app.core.extension.content.SinglePage; import run.halo.app.core.extension.content.SinglePage;
import run.halo.app.core.extension.content.Snapshot; import run.halo.app.core.extension.content.Snapshot;
@ -43,8 +45,6 @@ import run.halo.app.infra.ConditionList;
import run.halo.app.infra.ConditionStatus; import run.halo.app.infra.ConditionStatus;
import run.halo.app.infra.ExternalUrlSupplier; import run.halo.app.infra.ExternalUrlSupplier;
import run.halo.app.infra.utils.JsonUtils; import run.halo.app.infra.utils.JsonUtils;
import run.halo.app.metrics.CounterService;
import run.halo.app.metrics.MeterUtils;
import run.halo.app.notification.NotificationCenter; import run.halo.app.notification.NotificationCenter;
import run.halo.app.plugin.extensionpoint.ExtensionGetter; import run.halo.app.plugin.extensionpoint.ExtensionGetter;

View File

@ -3,9 +3,9 @@ package run.halo.app.event.post;
import lombok.Getter; import lombok.Getter;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.context.ApplicationEvent; import org.springframework.context.ApplicationEvent;
import run.halo.app.core.counter.MeterUtils;
import run.halo.app.core.extension.Counter; import run.halo.app.core.extension.Counter;
import run.halo.app.core.extension.content.Post; import run.halo.app.core.extension.content.Post;
import run.halo.app.metrics.MeterUtils;
@Getter @Getter
public class PostStatsChangedEvent extends ApplicationEvent { public class PostStatsChangedEvent extends ApplicationEvent {

View File

@ -24,6 +24,8 @@ import org.springframework.util.DigestUtils;
import reactor.core.publisher.Flux; import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono; import reactor.core.publisher.Mono;
import run.halo.app.content.comment.OwnerInfo; import run.halo.app.content.comment.OwnerInfo;
import run.halo.app.core.counter.CounterService;
import run.halo.app.core.counter.MeterUtils;
import run.halo.app.core.extension.User; import run.halo.app.core.extension.User;
import run.halo.app.core.extension.content.Comment; import run.halo.app.core.extension.content.Comment;
import run.halo.app.core.extension.content.Reply; import run.halo.app.core.extension.content.Reply;
@ -38,8 +40,6 @@ import run.halo.app.extension.Ref;
import run.halo.app.extension.index.query.Query; import run.halo.app.extension.index.query.Query;
import run.halo.app.extension.router.selector.FieldSelector; import run.halo.app.extension.router.selector.FieldSelector;
import run.halo.app.infra.AnonymousUserConst; import run.halo.app.infra.AnonymousUserConst;
import run.halo.app.metrics.CounterService;
import run.halo.app.metrics.MeterUtils;
import run.halo.app.theme.finders.CommentPublicQueryService; import run.halo.app.theme.finders.CommentPublicQueryService;
import run.halo.app.theme.finders.vo.CommentStatsVo; import run.halo.app.theme.finders.vo.CommentStatsVo;
import run.halo.app.theme.finders.vo.CommentVo; import run.halo.app.theme.finders.vo.CommentVo;

View File

@ -11,13 +11,13 @@ import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono; import reactor.core.publisher.Mono;
import run.halo.app.content.ContentWrapper; import run.halo.app.content.ContentWrapper;
import run.halo.app.content.PostService; import run.halo.app.content.PostService;
import run.halo.app.core.counter.CounterService;
import run.halo.app.core.counter.MeterUtils;
import run.halo.app.core.extension.content.Post; import run.halo.app.core.extension.content.Post;
import run.halo.app.extension.ListOptions; import run.halo.app.extension.ListOptions;
import run.halo.app.extension.ListResult; import run.halo.app.extension.ListResult;
import run.halo.app.extension.PageRequest; import run.halo.app.extension.PageRequest;
import run.halo.app.extension.ReactiveExtensionClient; import run.halo.app.extension.ReactiveExtensionClient;
import run.halo.app.metrics.CounterService;
import run.halo.app.metrics.MeterUtils;
import run.halo.app.plugin.extensionpoint.ExtensionGetter; import run.halo.app.plugin.extensionpoint.ExtensionGetter;
import run.halo.app.theme.ReactivePostContentHandler; import run.halo.app.theme.ReactivePostContentHandler;
import run.halo.app.theme.finders.CategoryFinder; import run.halo.app.theme.finders.CategoryFinder;

View File

@ -19,14 +19,14 @@ import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono; import reactor.core.publisher.Mono;
import run.halo.app.content.ContentWrapper; import run.halo.app.content.ContentWrapper;
import run.halo.app.content.SinglePageService; import run.halo.app.content.SinglePageService;
import run.halo.app.core.counter.CounterService;
import run.halo.app.core.counter.MeterUtils;
import run.halo.app.core.extension.content.SinglePage; import run.halo.app.core.extension.content.SinglePage;
import run.halo.app.extension.ListOptions; import run.halo.app.extension.ListOptions;
import run.halo.app.extension.ListResult; import run.halo.app.extension.ListResult;
import run.halo.app.extension.PageRequest; import run.halo.app.extension.PageRequest;
import run.halo.app.extension.PageRequestImpl; import run.halo.app.extension.PageRequestImpl;
import run.halo.app.extension.ReactiveExtensionClient; import run.halo.app.extension.ReactiveExtensionClient;
import run.halo.app.metrics.CounterService;
import run.halo.app.metrics.MeterUtils;
import run.halo.app.plugin.extensionpoint.ExtensionGetter; import run.halo.app.plugin.extensionpoint.ExtensionGetter;
import run.halo.app.theme.ReactiveSinglePageContentHandler; import run.halo.app.theme.ReactiveSinglePageContentHandler;
import run.halo.app.theme.ReactiveSinglePageContentHandler.SinglePageContentContext; import run.halo.app.theme.ReactiveSinglePageContentHandler.SinglePageContentContext;

View File

@ -29,6 +29,8 @@ import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono; import reactor.core.publisher.Mono;
import reactor.test.StepVerifier; import reactor.test.StepVerifier;
import run.halo.app.content.TestPost; import run.halo.app.content.TestPost;
import run.halo.app.core.counter.CounterService;
import run.halo.app.core.counter.MeterUtils;
import run.halo.app.core.extension.Counter; import run.halo.app.core.extension.Counter;
import run.halo.app.core.extension.User; import run.halo.app.core.extension.User;
import run.halo.app.core.extension.content.Comment; import run.halo.app.core.extension.content.Comment;
@ -44,8 +46,6 @@ import run.halo.app.extension.Ref;
import run.halo.app.infra.SystemConfigurableEnvironmentFetcher; import run.halo.app.infra.SystemConfigurableEnvironmentFetcher;
import run.halo.app.infra.SystemSetting; import run.halo.app.infra.SystemSetting;
import run.halo.app.infra.utils.JsonUtils; import run.halo.app.infra.utils.JsonUtils;
import run.halo.app.metrics.CounterService;
import run.halo.app.metrics.MeterUtils;
import run.halo.app.plugin.extensionpoint.ExtensionGetter; import run.halo.app.plugin.extensionpoint.ExtensionGetter;
import run.halo.app.security.authorization.AuthorityUtils; import run.halo.app.security.authorization.AuthorityUtils;

View File

@ -1,4 +1,4 @@
package run.halo.app.metrics; package run.halo.app.core.counter;
import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;

View File

@ -30,16 +30,15 @@ import run.halo.app.content.ExcerptGenerator;
import run.halo.app.content.NotificationReasonConst; import run.halo.app.content.NotificationReasonConst;
import run.halo.app.content.SinglePageService; import run.halo.app.content.SinglePageService;
import run.halo.app.content.TestPost; import run.halo.app.content.TestPost;
import run.halo.app.core.counter.CounterService;
import run.halo.app.core.extension.content.Post; import run.halo.app.core.extension.content.Post;
import run.halo.app.core.extension.content.SinglePage; import run.halo.app.core.extension.content.SinglePage;
import run.halo.app.core.extension.content.Snapshot; import run.halo.app.core.extension.content.Snapshot;
import run.halo.app.core.extension.notification.Subscription; import run.halo.app.core.extension.notification.Subscription;
import run.halo.app.core.reconciler.SinglePageReconciler;
import run.halo.app.extension.ExtensionClient; import run.halo.app.extension.ExtensionClient;
import run.halo.app.extension.Metadata; import run.halo.app.extension.Metadata;
import run.halo.app.extension.controller.Reconciler; import run.halo.app.extension.controller.Reconciler;
import run.halo.app.infra.ExternalUrlSupplier; import run.halo.app.infra.ExternalUrlSupplier;
import run.halo.app.metrics.CounterService;
import run.halo.app.notification.NotificationCenter; import run.halo.app.notification.NotificationCenter;
import run.halo.app.plugin.extensionpoint.ExtensionGetter; import run.halo.app.plugin.extensionpoint.ExtensionGetter;

View File

@ -20,6 +20,7 @@ import org.mockito.stubbing.Answer;
import org.skyscreamer.jsonassert.JSONAssert; import org.skyscreamer.jsonassert.JSONAssert;
import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.test.context.junit.jupiter.SpringExtension;
import reactor.core.publisher.Mono; import reactor.core.publisher.Mono;
import run.halo.app.core.counter.CounterService;
import run.halo.app.core.extension.Counter; import run.halo.app.core.extension.Counter;
import run.halo.app.core.extension.User; import run.halo.app.core.extension.User;
import run.halo.app.core.extension.content.Comment; import run.halo.app.core.extension.content.Comment;
@ -32,7 +33,6 @@ import run.halo.app.extension.ReactiveExtensionClient;
import run.halo.app.extension.Ref; import run.halo.app.extension.Ref;
import run.halo.app.infra.AnonymousUserConst; import run.halo.app.infra.AnonymousUserConst;
import run.halo.app.infra.utils.JsonUtils; import run.halo.app.infra.utils.JsonUtils;
import run.halo.app.metrics.CounterService;
/** /**
* Tests for {@link CommentFinderImpl}. * Tests for {@link CommentFinderImpl}.

View File

@ -19,12 +19,12 @@ import org.mockito.junit.jupiter.MockitoExtension;
import org.springframework.data.domain.Sort; import org.springframework.data.domain.Sort;
import reactor.core.publisher.Mono; import reactor.core.publisher.Mono;
import run.halo.app.content.PostService; import run.halo.app.content.PostService;
import run.halo.app.core.counter.CounterService;
import run.halo.app.core.extension.content.Post; import run.halo.app.core.extension.content.Post;
import run.halo.app.extension.ListResult; import run.halo.app.extension.ListResult;
import run.halo.app.extension.Metadata; import run.halo.app.extension.Metadata;
import run.halo.app.extension.PageRequest; import run.halo.app.extension.PageRequest;
import run.halo.app.extension.ReactiveExtensionClient; import run.halo.app.extension.ReactiveExtensionClient;
import run.halo.app.metrics.CounterService;
import run.halo.app.theme.finders.CategoryFinder; import run.halo.app.theme.finders.CategoryFinder;
import run.halo.app.theme.finders.ContributorFinder; import run.halo.app.theme.finders.ContributorFinder;
import run.halo.app.theme.finders.PostPublicQueryService; import run.halo.app.theme.finders.PostPublicQueryService;