簡體   English   中英

使用spring Http.outboundGateway DSL的HttpRequestExecutingMessageHandler錯誤

[英]HttpRequestExecutingMessageHandler error using spring Http.outboundGateway dsl

使用Http.outboundGateway時出現以下錯誤,有人可以幫我哪里出錯

@Bean
public IntegrationFlow syncProcessFlow() {
    return 
            // dsl code to fetch a message from Queue
            ...
            .<Event, EventType>route(event -> event.getType(), mapping -> mapping
                    .channelMapping(EventType.CREATE, "createFlow")
                    .defaultOutputChannel("nullChannel")
                    .resolutionRequired(false))
            .get();
}

@Bean
public IntegrationFlow createFlow() {
    return IntegrationFlows.from("createFlow")
           .handle(Http.outboundGateway("http://google.com")
                    .httpMethod(HttpMethod.GET)
                    .expectedResponseType(String.class))
            .log(LoggingHandler.Level.DEBUG, "response", m -> m.getPayload())
            .log(LoggingHandler.Level.DEBUG, "response", m -> m.getHeaders())
            .get();
}

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.integration.http.outbound.HttpRequestExecutingMessageHandler#0': Post-processing of merged bean definition failed; nested exception is java.la
ng.IllegalStateException: Failed to introspect Class [org.springframework.integration.http.outbound.AbstractHttpRequestExecutingMessageHandler] from ClassLoader [java.net.URLClassLoader@6e708cdf]


Caused by: java.lang.NoClassDefFoundError: Lorg/springframework/expression/spel/support/SimpleEvaluationContext;

java.lang.NoClassDefFoundError: Lorg/springframework/expression/spel/support/SimpleEvaluationContext;

意味着您已經升級到最新的Spring Integration,但仍然堅持使用以前的Spring Framework版本。

或者,您需要依靠Spring Integration的傳遞依賴關系,或者也升級Spring Framework。

這種重大更改的所有原因都在這里: https//spring.io/blog/2018/04/05/multiple-cve-reports-published-for-the-spring-framework

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM