mirror of https://github.com/halo-dev/halo
chore: reorganize package structure in application project (#6691)
* chore: reorganize package structure in application projectpull/6673/head^2
parent
8b3bde050f
commit
03368281cc
|
@ -8,8 +8,8 @@ import reactor.core.publisher.Mono;
|
|||
import run.halo.app.core.extension.User;
|
||||
import run.halo.app.core.extension.content.Comment;
|
||||
import run.halo.app.core.extension.content.Reply;
|
||||
import run.halo.app.core.extension.service.RoleService;
|
||||
import run.halo.app.core.extension.service.UserService;
|
||||
import run.halo.app.core.user.service.RoleService;
|
||||
import run.halo.app.core.user.service.UserService;
|
||||
import run.halo.app.extension.ReactiveExtensionClient;
|
||||
import run.halo.app.metrics.CounterService;
|
||||
import run.halo.app.metrics.MeterUtils;
|
||||
|
|
|
@ -17,8 +17,8 @@ import reactor.core.publisher.Flux;
|
|||
import reactor.core.publisher.Mono;
|
||||
import reactor.util.retry.Retry;
|
||||
import run.halo.app.core.extension.content.Comment;
|
||||
import run.halo.app.core.extension.service.RoleService;
|
||||
import run.halo.app.core.extension.service.UserService;
|
||||
import run.halo.app.core.user.service.RoleService;
|
||||
import run.halo.app.core.user.service.UserService;
|
||||
import run.halo.app.extension.Extension;
|
||||
import run.halo.app.extension.ListOptions;
|
||||
import run.halo.app.extension.ListResult;
|
||||
|
|
|
@ -22,8 +22,8 @@ import reactor.core.publisher.Mono;
|
|||
import reactor.util.retry.Retry;
|
||||
import run.halo.app.core.extension.content.Comment;
|
||||
import run.halo.app.core.extension.content.Reply;
|
||||
import run.halo.app.core.extension.service.RoleService;
|
||||
import run.halo.app.core.extension.service.UserService;
|
||||
import run.halo.app.core.user.service.RoleService;
|
||||
import run.halo.app.core.user.service.UserService;
|
||||
import run.halo.app.extension.ListOptions;
|
||||
import run.halo.app.extension.ListResult;
|
||||
import run.halo.app.extension.PageRequest;
|
||||
|
|
|
@ -34,7 +34,7 @@ import run.halo.app.core.extension.content.Category;
|
|||
import run.halo.app.core.extension.content.Post;
|
||||
import run.halo.app.core.extension.content.Snapshot;
|
||||
import run.halo.app.core.extension.content.Tag;
|
||||
import run.halo.app.core.extension.service.UserService;
|
||||
import run.halo.app.core.user.service.UserService;
|
||||
import run.halo.app.extension.ListOptions;
|
||||
import run.halo.app.extension.ListResult;
|
||||
import run.halo.app.extension.MetadataOperator;
|
||||
|
|
|
@ -28,7 +28,7 @@ import run.halo.app.content.Stats;
|
|||
import run.halo.app.core.extension.content.Post;
|
||||
import run.halo.app.core.extension.content.SinglePage;
|
||||
import run.halo.app.core.extension.content.Snapshot;
|
||||
import run.halo.app.core.extension.service.UserService;
|
||||
import run.halo.app.core.user.service.UserService;
|
||||
import run.halo.app.extension.ListResult;
|
||||
import run.halo.app.extension.ReactiveExtensionClient;
|
||||
import run.halo.app.extension.Ref;
|
||||
|
|
|
@ -6,7 +6,7 @@ import java.nio.file.Path;
|
|||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.lang.NonNull;
|
||||
import reactor.core.publisher.Mono;
|
||||
import run.halo.app.core.extension.attachment.LocalThumbnail;
|
||||
import run.halo.app.core.attachment.extension.LocalThumbnail;
|
||||
import run.halo.app.infra.ExternalLinkProcessor;
|
||||
import run.halo.app.infra.exception.NotFoundException;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.core.extension.attachment.endpoint;
|
||||
package run.halo.app.core.attachment.endpoint;
|
||||
|
||||
import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED;
|
||||
import static org.springdoc.core.fn.builders.apiresponse.Builder.responseBuilder;
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.core.extension.attachment.endpoint;
|
||||
package run.halo.app.core.attachment.endpoint;
|
||||
|
||||
import static java.nio.file.StandardOpenOption.CREATE_NEW;
|
||||
import static run.halo.app.infra.utils.FileNameUtils.randomFileName;
|
||||
|
@ -41,6 +41,7 @@ import run.halo.app.core.extension.attachment.Attachment;
|
|||
import run.halo.app.core.extension.attachment.Attachment.AttachmentSpec;
|
||||
import run.halo.app.core.extension.attachment.Constant;
|
||||
import run.halo.app.core.extension.attachment.Policy;
|
||||
import run.halo.app.core.extension.attachment.endpoint.AttachmentHandler;
|
||||
import run.halo.app.extension.ConfigMap;
|
||||
import run.halo.app.extension.Metadata;
|
||||
import run.halo.app.infra.ExternalUrlSupplier;
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.core.extension.attachment;
|
||||
package run.halo.app.core.attachment.extension;
|
||||
|
||||
import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.NOT_REQUIRED;
|
||||
import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED;
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.core.extension.attachment;
|
||||
package run.halo.app.core.attachment.extension;
|
||||
|
||||
import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED;
|
||||
|
|
@ -38,7 +38,7 @@ import run.halo.app.core.attachment.LocalThumbnailService;
|
|||
import run.halo.app.core.attachment.ThumbnailGenerator;
|
||||
import run.halo.app.core.attachment.ThumbnailSigner;
|
||||
import run.halo.app.core.attachment.ThumbnailSize;
|
||||
import run.halo.app.core.extension.attachment.LocalThumbnail;
|
||||
import run.halo.app.core.attachment.extension.LocalThumbnail;
|
||||
import run.halo.app.extension.ListOptions;
|
||||
import run.halo.app.extension.ListResult;
|
||||
import run.halo.app.extension.Metadata;
|
||||
|
|
|
@ -20,7 +20,7 @@ import run.halo.app.core.attachment.ThumbnailProvider.ThumbnailContext;
|
|||
import run.halo.app.core.attachment.ThumbnailService;
|
||||
import run.halo.app.core.attachment.ThumbnailSigner;
|
||||
import run.halo.app.core.attachment.ThumbnailSize;
|
||||
import run.halo.app.core.extension.attachment.Thumbnail;
|
||||
import run.halo.app.core.attachment.extension.Thumbnail;
|
||||
import run.halo.app.extension.ListOptions;
|
||||
import run.halo.app.extension.ListResult;
|
||||
import run.halo.app.extension.Metadata;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package run.halo.app.core.attachment.reconciler;
|
||||
|
||||
import static org.springframework.data.domain.Sort.Order.desc;
|
||||
import static run.halo.app.core.extension.attachment.LocalThumbnail.REQUEST_TO_GENERATE_ANNO;
|
||||
import static run.halo.app.core.attachment.extension.LocalThumbnail.REQUEST_TO_GENERATE_ANNO;
|
||||
import static run.halo.app.extension.MetadataUtil.nullSafeAnnotations;
|
||||
import static run.halo.app.extension.index.query.QueryFactory.and;
|
||||
import static run.halo.app.extension.index.query.QueryFactory.equal;
|
||||
|
@ -23,9 +23,9 @@ import run.halo.app.core.attachment.AttachmentRootGetter;
|
|||
import run.halo.app.core.attachment.AttachmentUtils;
|
||||
import run.halo.app.core.attachment.LocalThumbnailService;
|
||||
import run.halo.app.core.attachment.ThumbnailGenerator;
|
||||
import run.halo.app.core.attachment.extension.LocalThumbnail;
|
||||
import run.halo.app.core.extension.attachment.Attachment;
|
||||
import run.halo.app.core.extension.attachment.Constant;
|
||||
import run.halo.app.core.extension.attachment.LocalThumbnail;
|
||||
import run.halo.app.extension.ExtensionClient;
|
||||
import run.halo.app.extension.ExtensionUtil;
|
||||
import run.halo.app.extension.ListOptions;
|
||||
|
|
|
@ -19,7 +19,7 @@ import org.springframework.web.reactive.socket.WebSocketHandler;
|
|||
import org.springframework.web.server.ServerWebExchange;
|
||||
import org.springframework.web.util.pattern.PathPattern;
|
||||
import reactor.core.publisher.Mono;
|
||||
import run.halo.app.console.WebSocketUtils;
|
||||
import run.halo.app.infra.console.WebSocketUtils;
|
||||
|
||||
public class WebSocketHandlerMapping extends AbstractHandlerMapping
|
||||
implements WebSocketEndpointManager, InitializingBean {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.core.extension.endpoint;
|
||||
package run.halo.app.core.endpoint.console;
|
||||
|
||||
import static org.springdoc.core.fn.builders.apiresponse.Builder.responseBuilder;
|
||||
import static org.springdoc.core.fn.builders.parameter.Builder.parameterBuilder;
|
||||
|
@ -12,6 +12,7 @@ import org.springframework.web.reactive.function.server.ServerRequest;
|
|||
import org.springframework.web.reactive.function.server.ServerResponse;
|
||||
import reactor.core.publisher.Mono;
|
||||
import run.halo.app.core.extension.AuthProvider;
|
||||
import run.halo.app.core.extension.endpoint.CustomEndpoint;
|
||||
import run.halo.app.security.AuthProviderService;
|
||||
import run.halo.app.security.ListedAuthProvider;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.core.extension.endpoint;
|
||||
package run.halo.app.core.endpoint.console;
|
||||
|
||||
import static org.springdoc.core.fn.builders.apiresponse.Builder.responseBuilder;
|
||||
import static org.springdoc.core.fn.builders.content.Builder.contentBuilder;
|
||||
|
@ -23,6 +23,7 @@ import run.halo.app.content.comment.ReplyRequest;
|
|||
import run.halo.app.content.comment.ReplyService;
|
||||
import run.halo.app.core.extension.content.Comment;
|
||||
import run.halo.app.core.extension.content.Reply;
|
||||
import run.halo.app.core.extension.endpoint.CustomEndpoint;
|
||||
import run.halo.app.extension.ListResult;
|
||||
import run.halo.app.infra.utils.HaloUtils;
|
||||
import run.halo.app.infra.utils.IpAddressUtils;
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.core.extension.endpoint;
|
||||
package run.halo.app.core.endpoint.console;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
|
@ -9,6 +9,7 @@ import org.springframework.web.reactive.function.server.RequestPredicates;
|
|||
import org.springframework.web.reactive.function.server.RouterFunction;
|
||||
import org.springframework.web.reactive.function.server.ServerResponse;
|
||||
import reactor.core.publisher.Mono;
|
||||
import run.halo.app.core.extension.endpoint.CustomEndpoint;
|
||||
import run.halo.app.extension.GroupVersion;
|
||||
|
||||
public class CustomEndpointsBuilder {
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.core.extension.endpoint;
|
||||
package run.halo.app.core.endpoint.console;
|
||||
|
||||
import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.NOT_REQUIRED;
|
||||
import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED;
|
||||
|
@ -60,15 +60,16 @@ import reactor.core.scheduler.Schedulers;
|
|||
import reactor.util.retry.Retry;
|
||||
import run.halo.app.core.extension.Plugin;
|
||||
import run.halo.app.core.extension.Setting;
|
||||
import run.halo.app.core.extension.service.PluginService;
|
||||
import run.halo.app.core.extension.theme.SettingUtils;
|
||||
import run.halo.app.core.extension.endpoint.CustomEndpoint;
|
||||
import run.halo.app.extension.ConfigMap;
|
||||
import run.halo.app.extension.ListOptions;
|
||||
import run.halo.app.extension.ReactiveExtensionClient;
|
||||
import run.halo.app.extension.router.IListRequest;
|
||||
import run.halo.app.extension.router.SortableRequest;
|
||||
import run.halo.app.infra.ReactiveUrlDataBufferFetcher;
|
||||
import run.halo.app.infra.utils.SettingUtils;
|
||||
import run.halo.app.plugin.PluginNotFoundException;
|
||||
import run.halo.app.plugin.PluginService;
|
||||
|
||||
@Slf4j
|
||||
@Component
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.core.extension.endpoint;
|
||||
package run.halo.app.core.endpoint.console;
|
||||
|
||||
import static org.springdoc.core.fn.builders.apiresponse.Builder.responseBuilder;
|
||||
import static org.springdoc.core.fn.builders.content.Builder.contentBuilder;
|
||||
|
@ -37,6 +37,7 @@ import run.halo.app.content.PostQuery;
|
|||
import run.halo.app.content.PostRequest;
|
||||
import run.halo.app.content.PostService;
|
||||
import run.halo.app.core.extension.content.Post;
|
||||
import run.halo.app.core.extension.endpoint.CustomEndpoint;
|
||||
import run.halo.app.extension.ListResult;
|
||||
import run.halo.app.extension.MetadataUtil;
|
||||
import run.halo.app.extension.ReactiveExtensionClient;
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.core.extension.endpoint;
|
||||
package run.halo.app.core.endpoint.console;
|
||||
|
||||
import static org.springdoc.core.fn.builders.apiresponse.Builder.responseBuilder;
|
||||
|
||||
|
@ -12,6 +12,7 @@ import run.halo.app.content.comment.ListedReply;
|
|||
import run.halo.app.content.comment.ReplyQuery;
|
||||
import run.halo.app.content.comment.ReplyService;
|
||||
import run.halo.app.core.extension.content.Reply;
|
||||
import run.halo.app.core.extension.endpoint.CustomEndpoint;
|
||||
import run.halo.app.extension.ListResult;
|
||||
|
||||
/**
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.core.extension.endpoint;
|
||||
package run.halo.app.core.endpoint.console;
|
||||
|
||||
import static org.springdoc.core.fn.builders.apiresponse.Builder.responseBuilder;
|
||||
import static org.springdoc.core.fn.builders.content.Builder.contentBuilder;
|
||||
|
@ -33,6 +33,7 @@ import run.halo.app.content.SinglePageRequest;
|
|||
import run.halo.app.content.SinglePageService;
|
||||
import run.halo.app.core.extension.content.Post;
|
||||
import run.halo.app.core.extension.content.SinglePage;
|
||||
import run.halo.app.core.extension.endpoint.CustomEndpoint;
|
||||
import run.halo.app.extension.ListResult;
|
||||
import run.halo.app.extension.MetadataUtil;
|
||||
import run.halo.app.extension.ReactiveExtensionClient;
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.core.extension.endpoint;
|
||||
package run.halo.app.core.endpoint.console;
|
||||
|
||||
import static org.springdoc.core.fn.builders.apiresponse.Builder.responseBuilder;
|
||||
import static run.halo.app.extension.index.query.QueryFactory.and;
|
||||
|
@ -15,6 +15,7 @@ import reactor.core.publisher.Mono;
|
|||
import run.halo.app.core.extension.Counter;
|
||||
import run.halo.app.core.extension.User;
|
||||
import run.halo.app.core.extension.content.Post;
|
||||
import run.halo.app.core.extension.endpoint.CustomEndpoint;
|
||||
import run.halo.app.extension.ListOptions;
|
||||
import run.halo.app.extension.PageRequestImpl;
|
||||
import run.halo.app.extension.ReactiveExtensionClient;
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.core.extension.endpoint;
|
||||
package run.halo.app.core.endpoint.console;
|
||||
|
||||
import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED;
|
||||
import static org.springdoc.core.fn.builders.apiresponse.Builder.responseBuilder;
|
||||
|
@ -25,6 +25,7 @@ import org.springframework.web.server.ResponseStatusException;
|
|||
import org.springframework.web.server.ServerWebInputException;
|
||||
import reactor.core.publisher.Mono;
|
||||
import reactor.util.retry.Retry;
|
||||
import run.halo.app.core.extension.endpoint.CustomEndpoint;
|
||||
import run.halo.app.extension.ConfigMap;
|
||||
import run.halo.app.extension.ReactiveExtensionClient;
|
||||
import run.halo.app.infra.InitializationStateGetter;
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.core.extension.endpoint;
|
||||
package run.halo.app.core.endpoint.console;
|
||||
|
||||
import static org.springdoc.core.fn.builders.apiresponse.Builder.responseBuilder;
|
||||
import static org.springdoc.core.fn.builders.parameter.Builder.parameterBuilder;
|
||||
|
@ -19,6 +19,7 @@ import org.springframework.web.reactive.function.server.ServerRequest;
|
|||
import org.springframework.web.reactive.function.server.ServerResponse;
|
||||
import reactor.core.publisher.Mono;
|
||||
import run.halo.app.core.extension.content.Tag;
|
||||
import run.halo.app.core.extension.endpoint.CustomEndpoint;
|
||||
import run.halo.app.extension.ListOptions;
|
||||
import run.halo.app.extension.ListResult;
|
||||
import run.halo.app.extension.PageRequestImpl;
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.core.extension.endpoint;
|
||||
package run.halo.app.core.endpoint.console;
|
||||
|
||||
import static org.springdoc.core.fn.builders.apiresponse.Builder.responseBuilder;
|
||||
import static org.springdoc.core.fn.builders.content.Builder.contentBuilder;
|
||||
|
@ -16,6 +16,7 @@ import org.springframework.web.reactive.function.server.RouterFunction;
|
|||
import org.springframework.web.reactive.function.server.ServerRequest;
|
||||
import org.springframework.web.reactive.function.server.ServerResponse;
|
||||
import reactor.core.publisher.Mono;
|
||||
import run.halo.app.core.extension.endpoint.CustomEndpoint;
|
||||
import run.halo.app.event.post.DownvotedEvent;
|
||||
import run.halo.app.event.post.UpvotedEvent;
|
||||
import run.halo.app.event.post.VisitedEvent;
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.core.extension.endpoint;
|
||||
package run.halo.app.core.endpoint.console;
|
||||
|
||||
import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED;
|
||||
import static org.apache.commons.lang3.ObjectUtils.defaultIfNull;
|
||||
|
@ -70,10 +70,11 @@ import reactor.util.retry.Retry;
|
|||
import run.halo.app.core.extension.Role;
|
||||
import run.halo.app.core.extension.User;
|
||||
import run.halo.app.core.extension.attachment.Attachment;
|
||||
import run.halo.app.core.extension.endpoint.CustomEndpoint;
|
||||
import run.halo.app.core.extension.service.AttachmentService;
|
||||
import run.halo.app.core.extension.service.EmailVerificationService;
|
||||
import run.halo.app.core.extension.service.RoleService;
|
||||
import run.halo.app.core.extension.service.UserService;
|
||||
import run.halo.app.core.user.service.EmailVerificationService;
|
||||
import run.halo.app.core.user.service.RoleService;
|
||||
import run.halo.app.core.user.service.UserService;
|
||||
import run.halo.app.extension.ListOptions;
|
||||
import run.halo.app.extension.ListResult;
|
||||
import run.halo.app.extension.Metadata;
|
|
@ -1,8 +1,8 @@
|
|||
package run.halo.app.theme.endpoint;
|
||||
package run.halo.app.core.endpoint.theme;
|
||||
|
||||
import static org.springdoc.core.fn.builders.apiresponse.Builder.responseBuilder;
|
||||
import static org.springdoc.core.fn.builders.parameter.Builder.parameterBuilder;
|
||||
import static run.halo.app.theme.endpoint.PublicApiUtils.toAnotherListResult;
|
||||
import static run.halo.app.core.endpoint.theme.PublicApiUtils.toAnotherListResult;
|
||||
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import lombok.RequiredArgsConstructor;
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.theme.endpoint;
|
||||
package run.halo.app.core.endpoint.theme;
|
||||
|
||||
import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED;
|
||||
import static org.apache.commons.lang3.BooleanUtils.isFalse;
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.theme.endpoint;
|
||||
package run.halo.app.core.endpoint.theme;
|
||||
|
||||
import static org.springdoc.core.fn.builders.apiresponse.Builder.responseBuilder;
|
||||
import static org.springdoc.core.fn.builders.parameter.Builder.parameterBuilder;
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.theme.endpoint;
|
||||
package run.halo.app.core.endpoint.theme;
|
||||
|
||||
import static org.springdoc.core.fn.builders.apiresponse.Builder.responseBuilder;
|
||||
import static org.springdoc.core.fn.builders.parameter.Builder.parameterBuilder;
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.theme.endpoint;
|
||||
package run.halo.app.core.endpoint.theme;
|
||||
|
||||
import org.springdoc.core.fn.builders.operation.Builder;
|
||||
import org.springframework.web.server.ServerWebExchange;
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.theme.endpoint;
|
||||
package run.halo.app.core.endpoint.theme;
|
||||
|
||||
import static org.springdoc.core.fn.builders.apiresponse.Builder.responseBuilder;
|
||||
import static org.springdoc.core.fn.builders.parameter.Builder.parameterBuilder;
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.theme.endpoint;
|
||||
package run.halo.app.core.endpoint.theme;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.theme.endpoint;
|
||||
package run.halo.app.core.endpoint.theme;
|
||||
|
||||
import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.NOT_REQUIRED;
|
||||
import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED;
|
||||
|
@ -30,9 +30,9 @@ import org.springframework.web.server.ServerWebInputException;
|
|||
import reactor.core.publisher.Mono;
|
||||
import run.halo.app.core.extension.User;
|
||||
import run.halo.app.core.extension.endpoint.CustomEndpoint;
|
||||
import run.halo.app.core.extension.service.EmailPasswordRecoveryService;
|
||||
import run.halo.app.core.extension.service.EmailVerificationService;
|
||||
import run.halo.app.core.extension.service.UserService;
|
||||
import run.halo.app.core.user.service.EmailPasswordRecoveryService;
|
||||
import run.halo.app.core.user.service.EmailVerificationService;
|
||||
import run.halo.app.core.user.service.UserService;
|
||||
import run.halo.app.extension.GroupVersion;
|
||||
import run.halo.app.infra.SystemConfigurableEnvironmentFetcher;
|
||||
import run.halo.app.infra.SystemSetting;
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.theme.endpoint;
|
||||
package run.halo.app.core.endpoint.theme;
|
||||
|
||||
import static org.springdoc.core.fn.builders.apiresponse.Builder.responseBuilder;
|
||||
import static org.springdoc.core.fn.builders.parameter.Builder.parameterBuilder;
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.theme.endpoint;
|
||||
package run.halo.app.core.endpoint.theme;
|
||||
|
||||
import static org.springdoc.core.fn.builders.apiresponse.Builder.responseBuilder;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.theme.endpoint;
|
||||
package run.halo.app.core.endpoint.theme;
|
||||
|
||||
import static org.springdoc.core.fn.builders.apiresponse.Builder.responseBuilder;
|
||||
import static org.springdoc.core.fn.builders.parameter.Builder.parameterBuilder;
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.theme.endpoint;
|
||||
package run.halo.app.core.endpoint.theme;
|
||||
|
||||
import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED;
|
||||
import static org.springdoc.core.fn.builders.apiresponse.Builder.responseBuilder;
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.endpoint.uc.content;
|
||||
package run.halo.app.core.endpoint.uc;
|
||||
|
||||
import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.NOT_REQUIRED;
|
||||
import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED;
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.endpoint.uc.content;
|
||||
package run.halo.app.core.endpoint.uc;
|
||||
|
||||
import static org.springdoc.core.fn.builders.apiresponse.Builder.responseBuilder;
|
||||
import static org.springdoc.core.fn.builders.parameter.Builder.parameterBuilder;
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.endpoint.uc.content;
|
||||
package run.halo.app.core.endpoint.uc;
|
||||
|
||||
import static org.springdoc.core.fn.builders.apiresponse.Builder.responseBuilder;
|
||||
import static org.springdoc.core.fn.builders.parameter.Builder.parameterBuilder;
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.core.extension.reconciler;
|
||||
package run.halo.app.core.reconciler;
|
||||
|
||||
import java.util.Map;
|
||||
import lombok.AllArgsConstructor;
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.core.extension.reconciler;
|
||||
package run.halo.app.core.reconciler;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.lang3.BooleanUtils;
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.core.extension.reconciler;
|
||||
package run.halo.app.core.reconciler;
|
||||
|
||||
import static run.halo.app.extension.ExtensionUtil.addFinalizers;
|
||||
import static run.halo.app.extension.ExtensionUtil.removeFinalizers;
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.core.extension.reconciler;
|
||||
package run.halo.app.core.reconciler;
|
||||
|
||||
import static org.apache.commons.lang3.ObjectUtils.defaultIfNull;
|
||||
import static run.halo.app.extension.ExtensionUtil.addFinalizers;
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.core.extension.reconciler;
|
||||
package run.halo.app.core.reconciler;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.util.Objects;
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.core.extension.reconciler;
|
||||
package run.halo.app.core.reconciler;
|
||||
|
||||
import static run.halo.app.core.extension.Plugin.PluginStatus.nullSafeConditions;
|
||||
import static run.halo.app.extension.ExtensionUtil.addFinalizers;
|
||||
|
@ -44,7 +44,6 @@ import org.springframework.web.util.UriComponentsBuilder;
|
|||
import run.halo.app.core.extension.Plugin;
|
||||
import run.halo.app.core.extension.ReverseProxy;
|
||||
import run.halo.app.core.extension.Setting;
|
||||
import run.halo.app.core.extension.theme.SettingUtils;
|
||||
import run.halo.app.extension.ConfigMap;
|
||||
import run.halo.app.extension.ExtensionClient;
|
||||
import run.halo.app.extension.ExtensionUtil;
|
||||
|
@ -59,6 +58,7 @@ import run.halo.app.infra.Condition;
|
|||
import run.halo.app.infra.ConditionList;
|
||||
import run.halo.app.infra.ConditionStatus;
|
||||
import run.halo.app.infra.utils.PathUtils;
|
||||
import run.halo.app.infra.utils.SettingUtils;
|
||||
import run.halo.app.infra.utils.YamlUnstructuredLoader;
|
||||
import run.halo.app.plugin.PluginConst;
|
||||
import run.halo.app.plugin.PluginProperties;
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.core.extension.reconciler;
|
||||
package run.halo.app.core.reconciler;
|
||||
|
||||
import static run.halo.app.extension.index.query.QueryFactory.startsWith;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.core.extension.reconciler;
|
||||
package run.halo.app.core.reconciler;
|
||||
|
||||
import static java.nio.charset.StandardCharsets.UTF_8;
|
||||
import static org.apache.commons.lang3.BooleanUtils.TRUE;
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.core.extension.reconciler;
|
||||
package run.halo.app.core.reconciler;
|
||||
|
||||
import static org.apache.commons.lang3.ObjectUtils.defaultIfNull;
|
||||
import static run.halo.app.extension.ExtensionUtil.addFinalizers;
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.core.extension.reconciler;
|
||||
package run.halo.app.core.reconciler;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.core.extension.reconciler;
|
||||
package run.halo.app.core.reconciler;
|
||||
|
||||
import static java.util.Objects.deepEquals;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.core.extension.reconciler;
|
||||
package run.halo.app.core.reconciler;
|
||||
|
||||
import static java.nio.charset.StandardCharsets.UTF_8;
|
||||
import static org.springframework.web.util.UriUtils.encodePath;
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.core.extension.reconciler;
|
||||
package run.halo.app.core.reconciler;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.core.extension.reconciler;
|
||||
package run.halo.app.core.reconciler;
|
||||
|
||||
import static run.halo.app.extension.ExtensionUtil.addFinalizers;
|
||||
import static run.halo.app.extension.ExtensionUtil.removeFinalizers;
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.core.extension.reconciler;
|
||||
package run.halo.app.core.reconciler;
|
||||
|
||||
import static org.apache.commons.lang3.ObjectUtils.defaultIfNull;
|
||||
|
||||
|
@ -17,7 +17,6 @@ import org.springframework.util.FileSystemUtils;
|
|||
import run.halo.app.core.extension.AnnotationSetting;
|
||||
import run.halo.app.core.extension.Setting;
|
||||
import run.halo.app.core.extension.Theme;
|
||||
import run.halo.app.core.extension.theme.SettingUtils;
|
||||
import run.halo.app.extension.ExtensionClient;
|
||||
import run.halo.app.extension.MetadataUtil;
|
||||
import run.halo.app.extension.controller.Controller;
|
||||
|
@ -30,6 +29,7 @@ import run.halo.app.infra.SystemVersionSupplier;
|
|||
import run.halo.app.infra.ThemeRootGetter;
|
||||
import run.halo.app.infra.exception.ThemeUninstallException;
|
||||
import run.halo.app.infra.utils.JsonUtils;
|
||||
import run.halo.app.infra.utils.SettingUtils;
|
||||
import run.halo.app.infra.utils.VersionUtils;
|
||||
|
||||
/**
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.core.extension.reconciler;
|
||||
package run.halo.app.core.reconciler;
|
||||
|
||||
import static run.halo.app.extension.ExtensionUtil.addFinalizers;
|
||||
import static run.halo.app.extension.ExtensionUtil.defaultSort;
|
||||
|
@ -23,8 +23,8 @@ import run.halo.app.core.extension.User;
|
|||
import run.halo.app.core.extension.UserConnection;
|
||||
import run.halo.app.core.extension.attachment.Attachment;
|
||||
import run.halo.app.core.extension.service.AttachmentService;
|
||||
import run.halo.app.core.extension.service.RoleService;
|
||||
import run.halo.app.core.extension.service.UserService;
|
||||
import run.halo.app.core.user.service.RoleService;
|
||||
import run.halo.app.core.user.service.UserService;
|
||||
import run.halo.app.extension.ExtensionClient;
|
||||
import run.halo.app.extension.ListOptions;
|
||||
import run.halo.app.extension.controller.Controller;
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.core.extension.service;
|
||||
package run.halo.app.core.user.service;
|
||||
|
||||
import static run.halo.app.extension.ExtensionUtil.defaultSort;
|
||||
import static run.halo.app.extension.ExtensionUtil.notDeleting;
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.core.extension.service;
|
||||
package run.halo.app.core.user.service;
|
||||
|
||||
import reactor.core.publisher.Mono;
|
||||
import run.halo.app.infra.exception.AccessDeniedException;
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.core.extension.service;
|
||||
package run.halo.app.core.user.service;
|
||||
|
||||
import reactor.core.publisher.Mono;
|
||||
import run.halo.app.infra.exception.EmailVerificationFailed;
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.core.extension.service;
|
||||
package run.halo.app.core.user.service;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.core.extension.service;
|
||||
package run.halo.app.core.user.service;
|
||||
|
||||
import java.util.Set;
|
||||
import reactor.core.publisher.Flux;
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.core.extension.service;
|
||||
package run.halo.app.core.user.service;
|
||||
|
||||
import static org.springframework.data.domain.Sort.Order.asc;
|
||||
import static org.springframework.data.domain.Sort.Order.desc;
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.core.extension.service.impl;
|
||||
package run.halo.app.core.user.service.impl;
|
||||
|
||||
import java.net.URI;
|
||||
import java.net.URL;
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.core.extension.service.impl;
|
||||
package run.halo.app.core.user.service.impl;
|
||||
|
||||
import com.google.common.cache.Cache;
|
||||
import com.google.common.cache.CacheBuilder;
|
||||
|
@ -18,8 +18,8 @@ import reactor.util.retry.Retry;
|
|||
import run.halo.app.core.extension.User;
|
||||
import run.halo.app.core.extension.notification.Reason;
|
||||
import run.halo.app.core.extension.notification.Subscription;
|
||||
import run.halo.app.core.extension.service.EmailPasswordRecoveryService;
|
||||
import run.halo.app.core.extension.service.UserService;
|
||||
import run.halo.app.core.user.service.EmailPasswordRecoveryService;
|
||||
import run.halo.app.core.user.service.UserService;
|
||||
import run.halo.app.extension.GroupVersion;
|
||||
import run.halo.app.extension.ReactiveExtensionClient;
|
||||
import run.halo.app.infra.ExternalLinkProcessor;
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.core.extension.service.impl;
|
||||
package run.halo.app.core.user.service.impl;
|
||||
|
||||
import com.google.common.cache.Cache;
|
||||
import com.google.common.cache.CacheBuilder;
|
||||
|
@ -19,8 +19,8 @@ import reactor.util.retry.Retry;
|
|||
import run.halo.app.core.extension.User;
|
||||
import run.halo.app.core.extension.notification.Reason;
|
||||
import run.halo.app.core.extension.notification.Subscription;
|
||||
import run.halo.app.core.extension.service.EmailVerificationService;
|
||||
import run.halo.app.core.extension.service.UserService;
|
||||
import run.halo.app.core.user.service.EmailVerificationService;
|
||||
import run.halo.app.core.user.service.UserService;
|
||||
import run.halo.app.extension.GroupVersion;
|
||||
import run.halo.app.extension.MetadataUtil;
|
||||
import run.halo.app.extension.ReactiveExtensionClient;
|
|
@ -10,10 +10,10 @@ import org.springframework.core.io.buffer.DefaultDataBufferFactory;
|
|||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.util.ResourceUtils;
|
||||
import org.springframework.util.StreamUtils;
|
||||
import run.halo.app.core.extension.theme.ThemeService;
|
||||
import run.halo.app.infra.properties.HaloProperties;
|
||||
import run.halo.app.infra.properties.ThemeProperties;
|
||||
import run.halo.app.infra.utils.FileUtils;
|
||||
import run.halo.app.theme.service.ThemeService;
|
||||
|
||||
@Slf4j
|
||||
@Component
|
||||
|
@ -44,7 +44,7 @@ public class DefaultThemeInitializer implements ApplicationListener<ApplicationS
|
|||
// TODO Checking if any themes are installed here in the future might be better?
|
||||
if (!FileUtils.isEmpty(themeRoot)) {
|
||||
log.debug("Skipped initializing default theme because there are themes "
|
||||
+ "inside theme root");
|
||||
+ "inside theme root");
|
||||
return;
|
||||
}
|
||||
log.info("Initializing default theme from {}", location);
|
||||
|
|
|
@ -20,6 +20,8 @@ import org.springframework.context.ApplicationListener;
|
|||
import org.springframework.lang.NonNull;
|
||||
import org.springframework.stereotype.Component;
|
||||
import run.halo.app.content.Stats;
|
||||
import run.halo.app.core.attachment.extension.LocalThumbnail;
|
||||
import run.halo.app.core.attachment.extension.Thumbnail;
|
||||
import run.halo.app.core.extension.AnnotationSetting;
|
||||
import run.halo.app.core.extension.AuthProvider;
|
||||
import run.halo.app.core.extension.Counter;
|
||||
|
@ -38,10 +40,8 @@ import run.halo.app.core.extension.UserConnection;
|
|||
import run.halo.app.core.extension.UserConnection.UserConnectionSpec;
|
||||
import run.halo.app.core.extension.attachment.Attachment;
|
||||
import run.halo.app.core.extension.attachment.Group;
|
||||
import run.halo.app.core.extension.attachment.LocalThumbnail;
|
||||
import run.halo.app.core.extension.attachment.Policy;
|
||||
import run.halo.app.core.extension.attachment.PolicyTemplate;
|
||||
import run.halo.app.core.extension.attachment.Thumbnail;
|
||||
import run.halo.app.core.extension.content.Category;
|
||||
import run.halo.app.core.extension.content.Comment;
|
||||
import run.halo.app.core.extension.content.Post;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.actuator;
|
||||
package run.halo.app.infra.actuator;
|
||||
|
||||
import io.r2dbc.spi.Connection;
|
||||
import io.r2dbc.spi.ConnectionFactory;
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.actuator;
|
||||
package run.halo.app.infra.actuator;
|
||||
|
||||
import static org.apache.commons.lang3.BooleanUtils.isTrue;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.actuator;
|
||||
package run.halo.app.infra.actuator;
|
||||
|
||||
import java.io.Closeable;
|
||||
import java.io.IOException;
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.config;
|
||||
package run.halo.app.infra.config;
|
||||
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.context.annotation.Bean;
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.config;
|
||||
package run.halo.app.infra.config;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.databind.MapperFeature;
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.config;
|
||||
package run.halo.app.infra.config;
|
||||
|
||||
import static org.springdoc.core.utils.Constants.SPRINGDOC_ENABLED;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.config;
|
||||
package run.halo.app.infra.config;
|
||||
|
||||
import static org.springframework.util.ResourceUtils.FILE_URL_PREFIX;
|
||||
import static org.springframework.web.reactive.function.server.RequestPredicates.accept;
|
||||
|
@ -38,16 +38,16 @@ import org.springframework.web.reactive.result.method.annotation.RequestMappingH
|
|||
import org.springframework.web.reactive.result.view.ViewResolutionResultHandler;
|
||||
import org.springframework.web.reactive.result.view.ViewResolver;
|
||||
import reactor.core.publisher.Mono;
|
||||
import run.halo.app.console.ProxyFilter;
|
||||
import run.halo.app.console.WebSocketRequestPredicate;
|
||||
import run.halo.app.core.endpoint.WebSocketHandlerMapping;
|
||||
import run.halo.app.core.endpoint.console.CustomEndpointsBuilder;
|
||||
import run.halo.app.core.extension.endpoint.CustomEndpoint;
|
||||
import run.halo.app.core.extension.endpoint.CustomEndpointsBuilder;
|
||||
import run.halo.app.infra.SecureRequestMappingHandlerAdapter;
|
||||
import run.halo.app.infra.console.ProxyFilter;
|
||||
import run.halo.app.infra.console.WebSocketRequestPredicate;
|
||||
import run.halo.app.infra.properties.AttachmentProperties;
|
||||
import run.halo.app.infra.properties.HaloProperties;
|
||||
import run.halo.app.infra.webfilter.AdditionalWebFilterChainProxy;
|
||||
import run.halo.app.plugin.extensionpoint.ExtensionGetter;
|
||||
import run.halo.app.webfilter.AdditionalWebFilterChainProxy;
|
||||
|
||||
@Configuration
|
||||
public class WebFluxConfig implements WebFluxConfigurer {
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.config;
|
||||
package run.halo.app.infra.config;
|
||||
|
||||
import static org.springframework.security.config.Customizer.withDefaults;
|
||||
import static org.springframework.security.web.server.authentication.ServerWebExchangeDelegatingReactiveAuthenticationManagerResolver.builder;
|
||||
|
@ -22,8 +22,8 @@ import org.springframework.session.MapSession;
|
|||
import org.springframework.session.config.annotation.web.server.EnableSpringWebSession;
|
||||
import org.springframework.web.reactive.function.server.RouterFunction;
|
||||
import org.springframework.web.reactive.function.server.ServerResponse;
|
||||
import run.halo.app.core.extension.service.RoleService;
|
||||
import run.halo.app.core.extension.service.UserService;
|
||||
import run.halo.app.core.user.service.RoleService;
|
||||
import run.halo.app.core.user.service.UserService;
|
||||
import run.halo.app.extension.ReactiveExtensionClient;
|
||||
import run.halo.app.infra.AnonymousUserConst;
|
||||
import run.halo.app.infra.properties.HaloProperties;
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.console;
|
||||
package run.halo.app.infra.console;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.core.io.buffer.DataBuffer;
|
|
@ -1,6 +1,6 @@
|
|||
package run.halo.app.console;
|
||||
package run.halo.app.infra.console;
|
||||
|
||||
import static run.halo.app.console.WebSocketUtils.isWebSocketUpgrade;
|
||||
import static run.halo.app.infra.console.WebSocketUtils.isWebSocketUpgrade;
|
||||
|
||||
import org.springframework.web.reactive.function.server.RequestPredicate;
|
||||
import org.springframework.web.reactive.function.server.ServerRequest;
|
|
@ -1,8 +1,8 @@
|
|||
package run.halo.app.console;
|
||||
package run.halo.app.infra.console;
|
||||
|
||||
import static org.springframework.security.web.server.util.matcher.ServerWebExchangeMatcher.MatchResult.match;
|
||||
import static org.springframework.security.web.server.util.matcher.ServerWebExchangeMatcher.MatchResult.notMatch;
|
||||
import static run.halo.app.console.WebSocketUtils.isWebSocketUpgrade;
|
||||
import static run.halo.app.infra.console.WebSocketUtils.isWebSocketUpgrade;
|
||||
|
||||
import org.springframework.security.web.server.util.matcher.ServerWebExchangeMatcher;
|
||||
import org.springframework.web.server.ServerWebExchange;
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.console;
|
||||
package run.halo.app.infra.console;
|
||||
|
||||
import java.util.Objects;
|
||||
import org.springframework.http.HttpHeaders;
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.core.extension.theme;
|
||||
package run.halo.app.infra.utils;
|
||||
|
||||
import static org.apache.commons.lang3.ObjectUtils.defaultIfNull;
|
||||
|
||||
|
@ -21,8 +21,6 @@ import run.halo.app.core.extension.Setting;
|
|||
import run.halo.app.extension.ConfigMap;
|
||||
import run.halo.app.extension.ExtensionClient;
|
||||
import run.halo.app.extension.Metadata;
|
||||
import run.halo.app.infra.utils.JsonParseException;
|
||||
import run.halo.app.infra.utils.JsonUtils;
|
||||
|
||||
@UtilityClass
|
||||
public class SettingUtils {
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.webfilter;
|
||||
package run.halo.app.infra.webfilter;
|
||||
|
||||
import lombok.Setter;
|
||||
import org.springframework.core.annotation.AnnotationAwareOrderComparator;
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.webfilter;
|
||||
package run.halo.app.infra.webfilter;
|
||||
|
||||
import static run.halo.app.theme.ThemeLocaleContextResolver.LANGUAGE_COOKIE_NAME;
|
||||
import static run.halo.app.theme.ThemeLocaleContextResolver.LANGUAGE_PARAMETER_NAME;
|
|
@ -7,8 +7,8 @@ import org.springframework.web.reactive.function.server.RouterFunctions;
|
|||
import org.springframework.web.reactive.function.server.ServerRequest;
|
||||
import org.springframework.web.reactive.function.server.ServerResponse;
|
||||
import reactor.core.publisher.Mono;
|
||||
import run.halo.app.core.endpoint.console.CustomEndpointsBuilder;
|
||||
import run.halo.app.core.extension.endpoint.CustomEndpoint;
|
||||
import run.halo.app.core.extension.endpoint.CustomEndpointsBuilder;
|
||||
import run.halo.app.infra.SecureServerRequest;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.core.extension.service;
|
||||
package run.halo.app.plugin;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import org.springframework.core.io.Resource;
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.core.extension.service.impl;
|
||||
package run.halo.app.plugin;
|
||||
|
||||
import static java.nio.file.StandardCopyOption.REPLACE_EXISTING;
|
||||
import static java.nio.file.StandardOpenOption.CREATE;
|
||||
|
@ -49,7 +49,6 @@ import reactor.core.scheduler.Scheduler;
|
|||
import reactor.core.scheduler.Schedulers;
|
||||
import reactor.util.retry.Retry;
|
||||
import run.halo.app.core.extension.Plugin;
|
||||
import run.halo.app.core.extension.service.PluginService;
|
||||
import run.halo.app.extension.ReactiveExtensionClient;
|
||||
import run.halo.app.infra.SystemVersionSupplier;
|
||||
import run.halo.app.infra.exception.PluginAlreadyExistsException;
|
||||
|
@ -60,12 +59,6 @@ import run.halo.app.infra.exception.PluginInstallationException;
|
|||
import run.halo.app.infra.exception.UnsatisfiedAttributeValueException;
|
||||
import run.halo.app.infra.utils.FileUtils;
|
||||
import run.halo.app.infra.utils.VersionUtils;
|
||||
import run.halo.app.plugin.PluginConst;
|
||||
import run.halo.app.plugin.PluginUtils;
|
||||
import run.halo.app.plugin.PluginsRootGetter;
|
||||
import run.halo.app.plugin.SpringPluginManager;
|
||||
import run.halo.app.plugin.YamlPluginDescriptorFinder;
|
||||
import run.halo.app.plugin.YamlPluginFinder;
|
||||
import run.halo.app.plugin.resources.BundleResourceUtils;
|
||||
|
||||
@Slf4j
|
|
@ -13,8 +13,8 @@ import org.springframework.security.core.userdetails.ReactiveUserDetailsService;
|
|||
import org.springframework.security.core.userdetails.User;
|
||||
import org.springframework.security.core.userdetails.UserDetails;
|
||||
import reactor.core.publisher.Mono;
|
||||
import run.halo.app.core.extension.service.RoleService;
|
||||
import run.halo.app.core.extension.service.UserService;
|
||||
import run.halo.app.core.user.service.RoleService;
|
||||
import run.halo.app.core.user.service.UserService;
|
||||
import run.halo.app.infra.exception.UserNotFoundException;
|
||||
import run.halo.app.security.authentication.login.HaloUser;
|
||||
import run.halo.app.security.authentication.twofactor.TwoFactorUtils;
|
||||
|
|
|
@ -29,7 +29,7 @@ import org.springframework.web.reactive.function.server.ServerRequest;
|
|||
import org.springframework.web.reactive.function.server.ServerResponse;
|
||||
import org.springframework.web.server.ServerWebInputException;
|
||||
import reactor.core.publisher.Mono;
|
||||
import run.halo.app.core.extension.service.RoleService;
|
||||
import run.halo.app.core.user.service.RoleService;
|
||||
import run.halo.app.extension.ExtensionUtil;
|
||||
import run.halo.app.extension.Metadata;
|
||||
import run.halo.app.extension.ReactiveExtensionClient;
|
||||
|
|
|
@ -25,7 +25,7 @@ import org.springframework.web.util.UriComponentsBuilder;
|
|||
import reactor.core.publisher.Mono;
|
||||
import run.halo.app.core.extension.User;
|
||||
import run.halo.app.core.extension.endpoint.CustomEndpoint;
|
||||
import run.halo.app.core.extension.service.UserService;
|
||||
import run.halo.app.core.user.service.UserService;
|
||||
import run.halo.app.extension.GroupVersion;
|
||||
import run.halo.app.extension.ReactiveExtensionClient;
|
||||
import run.halo.app.infra.ExternalUrlSupplier;
|
||||
|
|
|
@ -7,7 +7,7 @@ import org.apache.commons.lang3.StringUtils;
|
|||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import reactor.core.publisher.Mono;
|
||||
import run.halo.app.core.extension.service.RoleService;
|
||||
import run.halo.app.core.user.service.RoleService;
|
||||
|
||||
/**
|
||||
* @author guqing
|
||||
|
|
|
@ -8,7 +8,7 @@ import org.springframework.security.authorization.ReactiveAuthorizationManager;
|
|||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.web.server.authorization.AuthorizationContext;
|
||||
import reactor.core.publisher.Mono;
|
||||
import run.halo.app.core.extension.service.RoleService;
|
||||
import run.halo.app.core.user.service.RoleService;
|
||||
|
||||
@Slf4j
|
||||
public class RequestInfoAuthorizationManager
|
||||
|
|
|
@ -6,7 +6,7 @@ import java.util.Set;
|
|||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.http.server.PathContainer;
|
||||
import org.springframework.http.server.reactive.ServerHttpRequest;
|
||||
import run.halo.app.console.WebSocketUtils;
|
||||
import run.halo.app.infra.console.WebSocketUtils;
|
||||
|
||||
/**
|
||||
* Creates {@link RequestInfo} from {@link ServerHttpRequest}.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.core.extension.theme;
|
||||
package run.halo.app.theme.endpoint;
|
||||
|
||||
import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED;
|
||||
import static org.springdoc.core.fn.builders.apiresponse.Builder.responseBuilder;
|
||||
|
@ -49,6 +49,8 @@ import run.halo.app.infra.ThemeRootGetter;
|
|||
import run.halo.app.infra.exception.NotFoundException;
|
||||
import run.halo.app.infra.utils.JsonUtils;
|
||||
import run.halo.app.theme.TemplateEngineManager;
|
||||
import run.halo.app.theme.service.ThemeService;
|
||||
import run.halo.app.theme.service.ThemeUtils;
|
||||
|
||||
/**
|
||||
* Endpoint for managing themes.
|
|
@ -27,7 +27,7 @@ import run.halo.app.content.comment.OwnerInfo;
|
|||
import run.halo.app.core.extension.User;
|
||||
import run.halo.app.core.extension.content.Comment;
|
||||
import run.halo.app.core.extension.content.Reply;
|
||||
import run.halo.app.core.extension.service.UserService;
|
||||
import run.halo.app.core.user.service.UserService;
|
||||
import run.halo.app.extension.AbstractExtension;
|
||||
import run.halo.app.extension.ListOptions;
|
||||
import run.halo.app.extension.ListResult;
|
||||
|
|
|
@ -4,7 +4,7 @@ import java.util.List;
|
|||
import lombok.RequiredArgsConstructor;
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
import run.halo.app.core.extension.service.UserService;
|
||||
import run.halo.app.core.user.service.UserService;
|
||||
import run.halo.app.theme.finders.ContributorFinder;
|
||||
import run.halo.app.theme.finders.Finder;
|
||||
import run.halo.app.theme.finders.vo.ContributorVo;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.core.extension.theme;
|
||||
package run.halo.app.theme.service;
|
||||
|
||||
import org.reactivestreams.Publisher;
|
||||
import org.springframework.core.io.buffer.DataBuffer;
|
|
@ -1,12 +1,12 @@
|
|||
package run.halo.app.core.extension.theme;
|
||||
package run.halo.app.theme.service;
|
||||
|
||||
import static org.springframework.util.FileSystemUtils.copyRecursively;
|
||||
import static run.halo.app.core.extension.theme.ThemeUtils.loadThemeManifest;
|
||||
import static run.halo.app.core.extension.theme.ThemeUtils.locateThemeManifest;
|
||||
import static run.halo.app.core.extension.theme.ThemeUtils.unzipThemeTo;
|
||||
import static run.halo.app.infra.utils.FileUtils.createTempDir;
|
||||
import static run.halo.app.infra.utils.FileUtils.deleteRecursivelyAndSilently;
|
||||
import static run.halo.app.infra.utils.FileUtils.unzip;
|
||||
import static run.halo.app.theme.service.ThemeUtils.loadThemeManifest;
|
||||
import static run.halo.app.theme.service.ThemeUtils.locateThemeManifest;
|
||||
import static run.halo.app.theme.service.ThemeUtils.unzipThemeTo;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.time.Duration;
|
||||
|
@ -41,6 +41,7 @@ import run.halo.app.infra.SystemVersionSupplier;
|
|||
import run.halo.app.infra.ThemeRootGetter;
|
||||
import run.halo.app.infra.exception.ThemeUpgradeException;
|
||||
import run.halo.app.infra.exception.UnsatisfiedAttributeValueException;
|
||||
import run.halo.app.infra.utils.SettingUtils;
|
||||
import run.halo.app.infra.utils.VersionUtils;
|
||||
|
||||
@Slf4j
|
|
@ -1,4 +1,4 @@
|
|||
package run.halo.app.core.extension.theme;
|
||||
package run.halo.app.theme.service;
|
||||
|
||||
import static org.springframework.util.FileSystemUtils.copyRecursively;
|
||||
import static run.halo.app.infra.utils.FileUtils.createTempDir;
|
||||
|
@ -16,6 +16,7 @@ import java.util.Optional;
|
|||
import java.util.Set;
|
||||
import java.util.stream.BaseStream;
|
||||
import java.util.stream.Stream;
|
||||
import lombok.experimental.UtilityClass;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.reactivestreams.Publisher;
|
||||
import org.springframework.core.io.FileSystemResource;
|
||||
|
@ -38,11 +39,12 @@ import run.halo.app.infra.utils.FileUtils;
|
|||
import run.halo.app.infra.utils.YamlUnstructuredLoader;
|
||||
|
||||
@Slf4j
|
||||
class ThemeUtils {
|
||||
@UtilityClass
|
||||
public class ThemeUtils {
|
||||
private static final String THEME_TMP_PREFIX = "halo-theme-";
|
||||
private static final String[] THEME_MANIFESTS = {"theme.yaml", "theme.yml"};
|
||||
|
||||
static Flux<Theme> listAllThemesFromThemeDir(Path themesDir) {
|
||||
public static Flux<Theme> listAllThemesFromThemeDir(Path themesDir) {
|
||||
return walkThemesFromPath(themesDir)
|
||||
.filter(Files::isDirectory)
|
||||
.map(ThemeUtils::findThemeManifest)
|
|
@ -26,7 +26,7 @@ import org.springframework.test.annotation.DirtiesContext;
|
|||
import org.springframework.test.web.reactive.server.WebTestClient;
|
||||
import reactor.core.publisher.Flux;
|
||||
import run.halo.app.core.extension.Role;
|
||||
import run.halo.app.core.extension.service.RoleService;
|
||||
import run.halo.app.core.user.service.RoleService;
|
||||
import run.halo.app.extension.ExtensionClient;
|
||||
import run.halo.app.extension.FakeExtension;
|
||||
import run.halo.app.extension.GroupVersionKind;
|
||||
|
|
|
@ -25,7 +25,7 @@ import reactor.core.publisher.Flux;
|
|||
import reactor.test.StepVerifier;
|
||||
import run.halo.app.core.endpoint.WebSocketEndpoint;
|
||||
import run.halo.app.core.extension.Role;
|
||||
import run.halo.app.core.extension.service.RoleService;
|
||||
import run.halo.app.core.user.service.RoleService;
|
||||
import run.halo.app.extension.GroupVersion;
|
||||
import run.halo.app.extension.Metadata;
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue