From 3a9e5d201066bb865481be91987e0774e7d182ca Mon Sep 17 00:00:00 2001 From: mwwcdk <55480425+mwwcdk@users.noreply.github.com> Date: Thu, 15 May 2025 00:38:36 +0800 Subject: [PATCH] Fix the deprecation warning of support for convention-base @Component names (#7433) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #### What type of PR is this? /kind improvement #### What this PR does / why we need it: 过期的Spring @Component API #### Which issue(s) this PR fixes: Fixes #7431 #### Does this PR introduce a user-facing change? ```release-note None ``` --- api/src/main/java/run/halo/app/theme/finders/Finder.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/src/main/java/run/halo/app/theme/finders/Finder.java b/api/src/main/java/run/halo/app/theme/finders/Finder.java index 6a24311a6..7948059ef 100644 --- a/api/src/main/java/run/halo/app/theme/finders/Finder.java +++ b/api/src/main/java/run/halo/app/theme/finders/Finder.java @@ -4,6 +4,7 @@ import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; +import org.springframework.core.annotation.AliasFor; import org.springframework.stereotype.Service; /** @@ -22,5 +23,6 @@ public @interface Finder { * * @return variable name, class simple name if not specified */ + @AliasFor(annotation = Service.class) String value() default ""; } \ No newline at end of file