Introduce TypeHint.Builder#onReachableType(Class<?>)
Closes gh-29017
This commit is contained in:
@@ -38,7 +38,7 @@ import org.springframework.lang.Nullable;
|
||||
class CodecConfigurerRuntimeHints implements RuntimeHintsRegistrar {
|
||||
|
||||
private static final Consumer<Builder> CODEC_HINT = type -> type
|
||||
.onReachableType(TypeReference.of(CodecConfigurerFactory.class))
|
||||
.onReachableType(CodecConfigurerFactory.class)
|
||||
.withMembers(MemberCategory.INVOKE_PUBLIC_CONSTRUCTORS);
|
||||
|
||||
@Override
|
||||
|
||||
@@ -22,7 +22,6 @@ import org.springframework.aot.hint.MemberCategory;
|
||||
import org.springframework.aot.hint.RuntimeHints;
|
||||
import org.springframework.aot.hint.RuntimeHintsRegistrar;
|
||||
import org.springframework.aot.hint.TypeHint.Builder;
|
||||
import org.springframework.aot.hint.TypeReference;
|
||||
|
||||
/**
|
||||
* {@link RuntimeHintsRegistrar} implementation that registers reflection entries
|
||||
@@ -35,7 +34,7 @@ import org.springframework.aot.hint.TypeReference;
|
||||
class JacksonModulesRuntimeHints implements RuntimeHintsRegistrar {
|
||||
|
||||
private static final Consumer<Builder> asJacksonModule = builder ->
|
||||
builder.onReachableType(TypeReference.of(Jackson2ObjectMapperBuilder.class))
|
||||
builder.onReachableType(Jackson2ObjectMapperBuilder.class)
|
||||
.withMembers(MemberCategory.INVOKE_DECLARED_CONSTRUCTORS);
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user