|
17 | 17 | package org.springframework.integration;
|
18 | 18 |
|
19 | 19 | import java.util.ArrayList;
|
| 20 | +import java.util.HashMap; |
| 21 | +import java.util.Hashtable; |
20 | 22 | import java.util.List;
|
| 23 | +import java.util.Properties; |
| 24 | +import java.util.UUID; |
21 | 25 |
|
22 | 26 | import org.springframework.integration.jdbc.store.JdbcMessageStore;
|
23 | 27 | import org.springframework.nativex.hint.AccessBits;
|
24 | 28 | import org.springframework.nativex.hint.InitializationHint;
|
25 | 29 | import org.springframework.nativex.hint.InitializationTime;
|
26 |
| -import org.springframework.nativex.hint.NativeHint; |
27 | 30 | import org.springframework.nativex.hint.JdkProxyHint;
|
| 31 | +import org.springframework.nativex.hint.NativeHint; |
28 | 32 | import org.springframework.nativex.hint.ResourceHint;
|
| 33 | +import org.springframework.nativex.hint.SerializationHint; |
29 | 34 | import org.springframework.nativex.hint.TypeHint;
|
30 | 35 | import org.springframework.nativex.type.AccessDescriptor;
|
31 | 36 | import org.springframework.nativex.type.HintDeclaration;
|
|
52 | 57 | org.springframework.integration.dsl.IntegrationFlow.class,
|
53 | 58 | org.springframework.integration.gateway.RequestReplyExchanger.class,
|
54 | 59 | org.springframework.integration.graph.Graph.class,
|
| 60 | + org.springframework.integration.graph.LinkNode.class, |
55 | 61 | org.springframework.integration.graph.SendTimers.class,
|
56 | 62 | org.springframework.integration.graph.TimerStats.class,
|
| 63 | + org.springframework.integration.graph.ReceiveCounters.class, |
57 | 64 | org.springframework.integration.http.management.IntegrationGraphController.class,
|
58 |
| - org.springframework.integration.handler.AbstractReplyProducingMessageHandler.RequestHandler.class, |
59 |
| - org.springframework.messaging.support.GenericMessage.class, |
60 |
| - org.springframework.messaging.support.ErrorMessage.class, |
61 |
| - org.springframework.integration.message.AdviceMessage.class, |
62 |
| - org.springframework.integration.support.MutableMessage.class, |
63 |
| - org.springframework.integration.store.MessageGroupMetadata.class, |
64 |
| - org.springframework.integration.store.MessageHolder.class, |
65 |
| - org.springframework.integration.store.MessageMetadata.class |
| 65 | + org.springframework.integration.handler.AbstractReplyProducingMessageHandler.RequestHandler.class |
66 | 66 | }),
|
67 | 67 | @TypeHint(access = AccessBits.CLASS | AccessBits.PUBLIC_METHODS,
|
68 | 68 | types = {
|
|
74 | 74 | org.springframework.integration.core.Pausable.class
|
75 | 75 | })
|
76 | 76 | },
|
| 77 | + serializables = { |
| 78 | + @SerializationHint( |
| 79 | + types = { |
| 80 | + Number.class, |
| 81 | + ArrayList.class, |
| 82 | + HashMap.class, |
| 83 | + Properties.class, |
| 84 | + Hashtable.class, |
| 85 | + Exception.class, |
| 86 | + UUID.class, |
| 87 | + org.springframework.messaging.support.GenericMessage.class, |
| 88 | + org.springframework.messaging.support.ErrorMessage.class, |
| 89 | + org.springframework.messaging.MessageHeaders.class, |
| 90 | + org.springframework.integration.message.AdviceMessage.class, |
| 91 | + org.springframework.integration.support.MutableMessage.class, |
| 92 | + org.springframework.integration.support.MutableMessageHeaders.class, |
| 93 | + org.springframework.integration.store.MessageGroupMetadata.class, |
| 94 | + org.springframework.integration.store.MessageHolder.class, |
| 95 | + org.springframework.integration.store.MessageMetadata.class, |
| 96 | + org.springframework.integration.history.MessageHistory.class, |
| 97 | + org.springframework.integration.history.MessageHistory.Entry.class, |
| 98 | + org.springframework.integration.handler.DelayHandler.DelayedMessageWrapper.class |
| 99 | + }) |
| 100 | + }, |
77 | 101 | jdkProxies = {
|
78 | 102 | @JdkProxyHint(
|
79 | 103 | types = {
|
|
113 | 137 | kotlin.Unit.class
|
114 | 138 | },
|
115 | 139 | access = AccessBits.CLASS | AccessBits.PUBLIC_METHODS))
|
| 140 | +@NativeHint(trigger = org.springframework.integration.file.splitter.FileSplitter.class, |
| 141 | + serializables = |
| 142 | + @SerializationHint(types = { |
| 143 | + org.springframework.integration.file.splitter.FileSplitter.FileMarker.class, |
| 144 | + org.springframework.integration.file.splitter.FileSplitter.FileMarker.Mark.class, |
| 145 | + })) |
116 | 146 | @NativeHint(trigger = org.springframework.integration.xml.transformer.XsltPayloadTransformer.class,
|
117 | 147 | types =
|
118 | 148 | @TypeHint(types = org.springframework.web.context.support.ServletContextResource.class,
|
@@ -157,8 +187,8 @@ public List<HintDeclaration> computeHints(TypeSystem typeSystem) {
|
157 | 187 | hints.addAll(computeMessagingGatewayHints(typeSystem));
|
158 | 188 | hints.addAll(computeAbstractEndpointHints(typeSystem));
|
159 | 189 | hints.addAll(computeIntegrationNodeHints(typeSystem));
|
160 |
| -// TODO Fails with 'Unable to find class file for org/springframework/web/server/WebFilter' on 'spring-aot-maven-plugin:test-generate' |
161 |
| -// hints.addAll(computeMessageHints(typeSystem)); |
| 190 | + // TODO Fails with 'Unable to find class file for org/springframework/web/server/WebFilter' on 'spring-aot-maven-plugin:test-generate' |
| 191 | + // hints.addAll(computeMessageHints(typeSystem)); |
162 | 192 | return hints;
|
163 | 193 | }
|
164 | 194 |
|
@@ -188,8 +218,8 @@ private static List<HintDeclaration> computeAbstractEndpointHints(TypeSystem typ
|
188 | 218 | .skipConstructorInspection()
|
189 | 219 | .filter(type -> type.extendsClass(ABSTRACT_ENDPOINT_TYPE))
|
190 | 220 | .onTypeDiscovered((type, context) ->
|
191 |
| - context.addReflectiveAccess(type, |
192 |
| - new AccessDescriptor(AccessBits.CLASS | AccessBits.PUBLIC_METHODS))) |
| 221 | + context.addReflectiveAccess(type, |
| 222 | + new AccessDescriptor(AccessBits.CLASS | AccessBits.PUBLIC_METHODS))) |
193 | 223 | .use(typeSystem)
|
194 | 224 | .processTypes();
|
195 | 225 | }
|
|
0 commit comments