From e8d5d707920ba2144d2e30f5cf80e3d0682ade52 Mon Sep 17 00:00:00 2001 From: Janne Valkealahti Date: Wed, 8 Feb 2023 14:04:42 +0000 Subject: [PATCH] Make annotated command visible to native - Use @Reflective with @Command - This should automatically register reflection hints and make native work again - Relates #638 --- .../org/springframework/shell/command/annotation/Command.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spring-shell-core/src/main/java/org/springframework/shell/command/annotation/Command.java b/spring-shell-core/src/main/java/org/springframework/shell/command/annotation/Command.java index 9933b5bf..bc361d9c 100644 --- a/spring-shell-core/src/main/java/org/springframework/shell/command/annotation/Command.java +++ b/spring-shell-core/src/main/java/org/springframework/shell/command/annotation/Command.java @@ -21,6 +21,7 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; +import org.springframework.aot.hint.annotation.Reflective; import org.springframework.shell.context.InteractionMode; /** @@ -31,6 +32,7 @@ import org.springframework.shell.context.InteractionMode; @Retention(RetentionPolicy.RUNTIME) @Target({ ElementType.TYPE, ElementType.METHOD }) @Documented +@Reflective public @interface Command { /**