diff --git a/spring-pulsar/src/main/java/org/springframework/pulsar/aot/PulsarRuntimeHints.java b/spring-pulsar/src/main/java/org/springframework/pulsar/aot/PulsarRuntimeHints.java index 828722fb..d1bc4886 100644 --- a/spring-pulsar/src/main/java/org/springframework/pulsar/aot/PulsarRuntimeHints.java +++ b/spring-pulsar/src/main/java/org/springframework/pulsar/aot/PulsarRuntimeHints.java @@ -41,8 +41,6 @@ import org.springframework.aot.hint.RuntimeHintsRegistrar; import org.springframework.aot.hint.TypeReference; import org.springframework.lang.Nullable; -import reactor.core.publisher.Flux; - /** * {@link RuntimeHintsRegistrar} for Spring for Apache Pulsar. * @@ -61,7 +59,7 @@ public class PulsarRuntimeHints implements RuntimeHintsRegistrar { Stream.of(HashSet.class, TreeMap.class, Authentication.class, AuthenticationDataProvider.class, SecretsSerializer.class, NioSocketChannel.class, AbstractByteBufAllocator.class, NioDatagramChannel.class, PulsarAdminBuilderImpl.class, OffloadProcessStatusImpl.class, Commands.class, - ReferenceCountUtil.class, Flux.class).forEach( + ReferenceCountUtil.class).forEach( type -> reflectionHints.registerType(type, builder -> builder.withMembers(MemberCategory.INVOKE_DECLARED_CONSTRUCTORS, MemberCategory.INVOKE_DECLARED_METHODS, @@ -88,8 +86,8 @@ public class PulsarRuntimeHints implements RuntimeHintsRegistrar { .forEach(typeName -> reflectionHints.registerTypeIfPresent(classLoader, typeName, MemberCategory.DECLARED_FIELDS)); - // Dynamic components that need hints with constructor and method level access. - Stream.of("com.github.benmanes.caffeine.cache.SSMSA", "com.github.benmanes.caffeine.cache.PSAMS") + Stream.of("reactor.core.publisher.Flux", "com.github.benmanes.caffeine.cache.SSMSA", + "com.github.benmanes.caffeine.cache.PSAMS") .forEach(typeName -> reflectionHints.registerTypeIfPresent(classLoader, typeName, MemberCategory.INVOKE_DECLARED_CONSTRUCTORS, MemberCategory.INVOKE_DECLARED_METHODS, MemberCategory.INTROSPECT_PUBLIC_METHODS));