Updated to cleanup hints that are no longer necessary

This commit is contained in:
Glenn Renfro
2022-08-25 21:16:09 -04:00
parent 0879bff549
commit 1ff5bc9ec5

View File

@@ -18,18 +18,10 @@ package org.springframework.cloud.task.configuration;
import java.sql.Statement;
import org.springframework.aop.SpringProxy;
import org.springframework.aop.framework.Advised;
import org.springframework.aot.hint.MemberCategory;
import org.springframework.aot.hint.RuntimeHints;
import org.springframework.aot.hint.RuntimeHintsRegistrar;
import org.springframework.aot.hint.TypeReference;
import org.springframework.aot.hint.support.RuntimeHintsUtils;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.cloud.task.repository.TaskExplorer;
import org.springframework.cloud.task.repository.TaskRepository;
import org.springframework.core.DecoratingProxy;
import org.springframework.core.annotation.SynthesizedAnnotation;
import org.springframework.util.ClassUtils;
/**
@@ -56,15 +48,6 @@ public class TaskRuntimeHints implements RuntimeHintsRegistrar {
hint -> hint.withMembers(MemberCategory.INVOKE_DECLARED_CONSTRUCTORS,
MemberCategory.INVOKE_DECLARED_METHODS));
hints.proxies().registerJdkProxy(builder -> builder.proxiedInterfaces(TaskRepository.class)
.proxiedInterfaces(SpringProxy.class, Advised.class, DecoratingProxy.class));
hints.proxies().registerJdkProxy(builder -> builder.proxiedInterfaces(TaskExplorer.class)
.proxiedInterfaces(SpringProxy.class, Advised.class, DecoratingProxy.class));
// Remove Qualifier hints once SCSt can be natively compiled.
hints.reflection().registerType(Qualifier.class, RuntimeHintsUtils.ANNOTATION_HINT);
hints.proxies().registerJdkProxy(Qualifier.class, SynthesizedAnnotation.class);
if (!ClassUtils.isPresent("com.zaxxer.hikari.HikariDataSource", classLoader)) {
return;
}