diff --git a/org.springframework.integration/src/main/java/org/springframework/integration/splitter/AbstractMessageProcessingSplitter.java b/org.springframework.integration/src/main/java/org/springframework/integration/splitter/AbstractMessageProcessingSplitter.java index a7681a94db..e77310c006 100644 --- a/org.springframework.integration/src/main/java/org/springframework/integration/splitter/AbstractMessageProcessingSplitter.java +++ b/org.springframework.integration/src/main/java/org/springframework/integration/splitter/AbstractMessageProcessingSplitter.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2009 the original author or authors. + * Copyright 2002-2010 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,9 @@ package org.springframework.integration.splitter; +import org.springframework.core.convert.ConversionService; import org.springframework.integration.core.Message; +import org.springframework.integration.handler.AbstractMessageProcessor; import org.springframework.integration.handler.MessageProcessor; import org.springframework.util.Assert; @@ -37,6 +39,14 @@ abstract class AbstractMessageProcessingSplitter extends AbstractMessageSplitter this.messageProcessor = messageProcessor; } + @Override + public void onInit() { + ConversionService conversionService = this.getConversionService(); + if (conversionService != null && this.messageProcessor instanceof AbstractMessageProcessor) { + ((AbstractMessageProcessor) this.messageProcessor).setConversionService(conversionService); + } + } + @Override protected final Object splitMessage(Message message) { return this.messageProcessor.processMessage(message);