INT-3538: Docs for Routing Slip
JIRA: https://jira.spring.io/browse/INT-3538 INT-3538-2: `RoutingSlipHeaderValueMessageProcessor` improvement Since `HeaderEnricher` populates `beanFactory` to its `HeaderValueMessageProcessor`s, there is no reason to specify `RoutingSlipHeaderValueMessageProcessor` as a separate bean. Therefore the `IntegrationEvaluationContextAware` may not be reached. Remove its support from `RoutingSlipHeaderValueMessageProcessor` and just rely on the `setBeanFactory` RS Doc Polishing
This commit is contained in:
committed by
Gary Russell
parent
af19bbfa70
commit
efe3b11fc3
@@ -157,12 +157,14 @@ public class HeaderEnricher extends IntegrationObjectSupport implements Transfor
|
||||
if (processor instanceof BeanFactoryAware && this.getBeanFactory() != null) {
|
||||
((BeanFactoryAware) processor).setBeanFactory(this.getBeanFactory());
|
||||
}
|
||||
Boolean processerOverwrite = processor.isOverwrite();
|
||||
if (processerOverwrite != null) {
|
||||
shouldOverwrite |= processerOverwrite;
|
||||
Boolean processorOverwrite = processor.isOverwrite();
|
||||
if (processorOverwrite != null) {
|
||||
shouldOverwrite |= processorOverwrite;
|
||||
}
|
||||
}
|
||||
if (this.messageProcessor != null && this.messageProcessor instanceof BeanFactoryAware && this.getBeanFactory() != null) {
|
||||
if (this.messageProcessor != null
|
||||
&& this.messageProcessor instanceof BeanFactoryAware
|
||||
&& this.getBeanFactory() != null) {
|
||||
((BeanFactoryAware) this.messageProcessor).setBeanFactory(this.getBeanFactory());
|
||||
}
|
||||
if (!shouldOverwrite && !this.shouldSkipNulls) {
|
||||
|
||||
@@ -26,7 +26,7 @@ import org.springframework.beans.BeansException;
|
||||
import org.springframework.beans.factory.BeanFactory;
|
||||
import org.springframework.beans.factory.BeanFactoryAware;
|
||||
import org.springframework.expression.EvaluationContext;
|
||||
import org.springframework.integration.expression.IntegrationEvaluationContextAware;
|
||||
import org.springframework.integration.context.IntegrationContextUtils;
|
||||
import org.springframework.integration.routingslip.ExpressionEvaluatingRoutingSlipRouteStrategy;
|
||||
import org.springframework.integration.routingslip.RoutingSlipRouteStrategy;
|
||||
import org.springframework.messaging.Message;
|
||||
@@ -46,7 +46,7 @@ import org.springframework.util.Assert;
|
||||
*/
|
||||
public class RoutingSlipHeaderValueMessageProcessor
|
||||
extends AbstractHeaderValueMessageProcessor<Map<List<Object>, Integer>>
|
||||
implements BeanFactoryAware, IntegrationEvaluationContextAware {
|
||||
implements BeanFactoryAware {
|
||||
|
||||
private final List<String> routingSlipPath;
|
||||
|
||||
@@ -64,12 +64,9 @@ public class RoutingSlipHeaderValueMessageProcessor
|
||||
|
||||
@Override
|
||||
public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
|
||||
Assert.notNull(beanFactory, "BeanFactory must not be null");
|
||||
this.beanFactory = beanFactory;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setIntegrationEvaluationContext(EvaluationContext evaluationContext) {
|
||||
this.evaluationContext = evaluationContext;
|
||||
this.evaluationContext = IntegrationContextUtils.getEvaluationContext(beanFactory);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user