Rob*_*man 4 spring-integration
迁移到Spring Integration 4.0.4时,使用使用以下创建的服务bean时会引发以下异常GatewayProxyFactoryBean:
Sep 30, 2014 3:45:21 PM org.springframework.integration.expression.ExpressionUtils createStandardEvaluationContext
WARNING: Creating EvaluationContext with no beanFactory
java.lang.RuntimeException: No beanfactory
    at org.springframework.integration.expression.ExpressionUtils.createStandardEvaluationContext(ExpressionUtils.java:79)
    at org.springframework.integration.gateway.GatewayMethodInboundMessageMapper.createMethodInvocationEvaluationContext(GatewayMethodInboundMessageMapper.java:182)
    at org.springframework.integration.gateway.GatewayMethodInboundMessageMapper.access$000(GatewayMethodInboundMessageMapper.java:77)
    at org.springframework.integration.gateway.GatewayMethodInboundMessageMapper$DefaultMethodArgsMessageMapper.toMessage(GatewayMethodInboundMessageMapper.java:279)
    at org.springframework.integration.gateway.GatewayMethodInboundMessageMapper$DefaultMethodArgsMessageMapper.toMessage(GatewayMethodInboundMessageMapper.java:272)
    at org.springframework.integration.gateway.GatewayMethodInboundMessageMapper.mapArgumentsToMessage(GatewayMethodInboundMessageMapper.java:158)
    at org.springframework.integration.gateway.GatewayMethodInboundMessageMapper.toMessage(GatewayMethodInboundMessageMapper.java:153)
    at org.springframework.integration.gateway.GatewayMethodInboundMessageMapper.toMessage(GatewayMethodInboundMessageMapper.java:77)
    at org.springframework.integration.support.converter.SimpleMessageConverter.toMessage(SimpleMessageConverter.java:82)
    at org.springframework.messaging.core.AbstractMessagingTemplate.convertSendAndReceive(AbstractMessagingTemplate.java:112)
    at org.springframework.messaging.core.AbstractMessagingTemplate.convertSendAndReceive(AbstractMessagingTemplate.java:103)
    at org.springframework.integration.gateway.MessagingGatewaySupport.doSendAndReceive(MessagingGatewaySupport.java:241)
    at org.springframework.integration.gateway.MessagingGatewaySupport.sendAndReceive(MessagingGatewaySupport.java:220)
    at org.springframework.integration.gateway.GatewayProxyFactoryBean.invokeGatewayMethod(GatewayProxyFactoryBean.java:341)
    at org.springframework.integration.gateway.GatewayProxyFactoryBean.doInvoke(GatewayProxyFactoryBean.java:304)
    at org.springframework.integration.gateway.GatewayProxyFactoryBean.invoke(GatewayProxyFactoryBean.java:295)
Run Code Online (Sandbox Code Playgroud)
我们的设计GatewayProxyFactoryBean广泛使用,这个例外似乎是新的.在这种情况下,我们不使用任何SpEL表达式.如何避免这种异常?  
实际上它不是Exception,而只是WARN.
从一侧您可以忽略它或降低该org.springframework.integration.expression.ExpressionUtils类别的日志记录级别.
或者,当然,什么会更好,甚至建议,当你创建你自己的GatewayProxyFactoryBean,为它BeanFactory和调用afterPropertiesSet()的那个GatewayProxyFactoryBean.
|   归档时间:  |  
           
  |  
        
|   查看次数:  |  
           2325 次  |  
        
|   最近记录:  |