GH-3828: Initial Spring AOT support (#3832)
* GH-3828: Initial Spring AOT support Fixes https://github.com/spring-projects/spring-integration/issues/3828 * Provide an infrastructure based on a new Spring AOT engine in the latest Spring Framework * Introduce `RuntimeHintsRegistrar` impls into modules which require some reflection, resources or proxies and serialization available in the native image * Mark some framework method with the `@Reflective` to make their reflection info available in the native image, for example for SpEL or JMX invocations * Add a `GatewayProxyBeanRegistrationAotProcessor` to register proxy interfaces info for messaging gateways (either instance of the `GatewayProxyFactoryBean`) * Rework `ConverterRegistrar` to not use a `beanFactory.getBeansWithAnnotation()` since it is not available after AOT phase. Instead, register an intermediate `IntegrationConverterRegistration` bean definition from the `IntegrationConverterInitializer` * Refactor `GlobalChannelInterceptorInitializer` a bit according to a new logic in the `IntegrationConverterInitializer` * Remove `JsonNodeWrapperToJsonNodeConverter` bean registration from the `DefaultConfiguringBeanFactoryPostProcessor` - it is added by the `ConverterRegistrar` into the target `ConversionService` * Fix `ParentContextTests` respectively a `JsonNodeWrapperToJsonNodeConverter` bean removal * Refactor `XsltPayloadTransformer` to not load a `ServletContextResource`, but just use its name for the `xslResource` condition * * Rework AOT support according latest changes and requirements * Remove `@Bean` reflection since it is not needed any more * Add `AotDetector.useGeneratedArtifacts()` condition to not register beans one more time at runtime after AOT build phase * Fix deprecation in the WebFlux test from the latest SF
This commit is contained in:
@@ -275,12 +275,11 @@ class WebFluxRequestExecutingMessageHandlerTests {
|
||||
|
||||
StepVerifier.create(
|
||||
response.getBody()
|
||||
.map(dataBuffer -> new String(dataBuffer.asByteBuffer().array())))
|
||||
.map(dataBuffer -> new String(dataBuffer.toByteBuffer().array())))
|
||||
.expectNext("foo", "bar", "baz")
|
||||
.verifyComplete();
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
void testClientHttpResponseErrorAsReply() {
|
||||
ClientHttpConnector httpConnector = new HttpHandlerConnector((request, response) -> {
|
||||
|
||||
Reference in New Issue
Block a user