Register SpringApplication on ReflectionHints for binding
Closes gh-31534
This commit is contained in:
@@ -33,6 +33,8 @@ import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import org.springframework.aot.AotDetector;
|
||||
import org.springframework.aot.hint.RuntimeHints;
|
||||
import org.springframework.aot.hint.RuntimeHintsRegistrar;
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.beans.CachedIntrospectionResults;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
@@ -45,6 +47,7 @@ import org.springframework.beans.factory.support.BeanNameGenerator;
|
||||
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
|
||||
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
|
||||
import org.springframework.boot.Banner.Mode;
|
||||
import org.springframework.boot.context.properties.ConfigurationPropertiesReflectionHintsRegistrar;
|
||||
import org.springframework.boot.context.properties.bind.Bindable;
|
||||
import org.springframework.boot.context.properties.bind.Binder;
|
||||
import org.springframework.boot.context.properties.source.ConfigurationPropertySources;
|
||||
@@ -1390,4 +1393,14 @@ public class SpringApplication {
|
||||
|
||||
}
|
||||
|
||||
static class SpringApplicationRuntimeHints implements RuntimeHintsRegistrar {
|
||||
|
||||
@Override
|
||||
public void registerHints(RuntimeHints hints, ClassLoader classLoader) {
|
||||
ConfigurationPropertiesReflectionHintsRegistrar.processConfigurationProperties(SpringApplication.class,
|
||||
hints.reflection());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ org.springframework.boot.env.PropertySourceRuntimeHints,\
|
||||
org.springframework.boot.json.JacksonRuntimeHints,\
|
||||
org.springframework.boot.logging.java.JavaLoggingSystemRuntimeHints,\
|
||||
org.springframework.boot.logging.logback.LogbackRuntimeHints,\
|
||||
org.springframework.boot.SpringApplication.SpringApplicationRuntimeHints,\
|
||||
org.springframework.boot.WebApplicationType.WebApplicationTypeRuntimeHints
|
||||
|
||||
org.springframework.beans.factory.aot.BeanFactoryInitializationAotProcessor=\
|
||||
|
||||
Reference in New Issue
Block a user