26
26
import java .util .function .Supplier ;
27
27
import java .util .stream .Stream ;
28
28
29
- import org .springframework .aop .SpringProxy ;
30
- import org .springframework .aop .framework .Advised ;
29
+ import org .springframework .aop .framework .AopProxyUtils ;
31
30
import org .springframework .aot .hint .MemberCategory ;
32
31
import org .springframework .aot .hint .ProxyHints ;
33
32
import org .springframework .aot .hint .ReflectionHints ;
37
36
import org .springframework .aot .hint .TypeReference ;
38
37
import org .springframework .beans .factory .config .BeanExpressionContext ;
39
38
import org .springframework .context .SmartLifecycle ;
40
- import org .springframework .core .DecoratingProxy ;
41
39
import org .springframework .integration .aggregator .MessageGroupProcessor ;
42
40
import org .springframework .integration .context .IntegrationContextUtils ;
41
+ import org .springframework .integration .context .IntegrationProperties ;
43
42
import org .springframework .integration .core .GenericSelector ;
44
43
import org .springframework .integration .core .MessageSource ;
45
44
import org .springframework .integration .dsl .IntegrationFlow ;
@@ -84,12 +83,11 @@ public void registerHints(RuntimeHints hints, ClassLoader classLoader) {
84
83
Supplier .class ,
85
84
BeanExpressionContext .class ,
86
85
IntegrationContextUtils .class ,
86
+ IntegrationProperties .class ,
87
87
MethodArgsHolder .class ,
88
88
AbstractReplyProducingMessageHandler .RequestHandler .class ,
89
89
ExpressionEvaluatingRoutingSlipRouteStrategy .RequestAndReply .class )
90
- .forEach (type ->
91
- reflectionHints .registerType (type ,
92
- builder -> builder .withMembers (MemberCategory .INVOKE_PUBLIC_METHODS )));
90
+ .forEach (type -> reflectionHints .registerType (type , MemberCategory .INVOKE_PUBLIC_METHODS ));
93
91
94
92
reflectionHints .registerType (JsonPathUtils .class ,
95
93
builder ->
@@ -98,15 +96,14 @@ public void registerHints(RuntimeHints hints, ClassLoader classLoader) {
98
96
99
97
// For #xpath() SpEL function
100
98
reflectionHints .registerTypeIfPresent (classLoader , "org.springframework.integration.xml.xpath.XPathUtils" ,
101
- builder -> builder . withMembers ( MemberCategory .INVOKE_PUBLIC_METHODS ) );
99
+ MemberCategory .INVOKE_PUBLIC_METHODS );
102
100
103
101
Stream .of (
104
102
"kotlin.jvm.functions.Function0" ,
105
103
"kotlin.jvm.functions.Function1" ,
106
104
"kotlin.Unit" )
107
105
.forEach (type ->
108
- reflectionHints .registerTypeIfPresent (classLoader , type ,
109
- builder -> builder .withMembers (MemberCategory .INVOKE_PUBLIC_METHODS )));
106
+ reflectionHints .registerTypeIfPresent (classLoader , type , MemberCategory .INVOKE_PUBLIC_METHODS ));
110
107
111
108
hints .resources ().registerPattern ("META-INF/spring.integration.properties" );
112
109
@@ -148,10 +145,7 @@ public void registerHints(RuntimeHints hints, ClassLoader classLoader) {
148
145
}
149
146
150
147
private static void registerSpringJdkProxy (ProxyHints proxyHints , Class <?>... proxiedInterfaces ) {
151
- proxyHints
152
- .registerJdkProxy (builder ->
153
- builder .proxiedInterfaces (proxiedInterfaces )
154
- .proxiedInterfaces (SpringProxy .class , Advised .class , DecoratingProxy .class ));
148
+ proxyHints .registerJdkProxy (AopProxyUtils .completeJdkProxyInterfaces (proxiedInterfaces ));
155
149
}
156
150
157
151
}
0 commit comments