INT-1639 Externalize SpEL Evaluation Context

Allow modification of context property accessors and
functions.

Polishing

- Fix tests to ensure the EvaluationContextFactoryBean is
available when necessary.

Polishing - Use Utility for ALL EvaluationContexts

Add Test Showing Custom Function

See SpelTransformerIntegrationTests-context.xml

Polishing

Polishing -fix Remote Sync

Polishing - Emit WARN if No BeanFactory

Polishing - Do Not Override ConversionService

Kludge to Prevent Warning When No BeanFactory

Expressions for method invoking in the MessagingMethodInvokerHelper
don't need a BeanFactory - suppress the warning.

Polishing - PR Comments - Invert Boolean
This commit is contained in:
Gary Russell
2013-08-21 15:05:21 -04:00
committed by Mark Fisher
parent 351af6b16b
commit 7f008b58c2
53 changed files with 983 additions and 360 deletions

View File

@@ -28,6 +28,8 @@ import javax.mail.Authenticator;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.xml.sax.SAXParseException;
import org.springframework.beans.DirectFieldAccessor;
import org.springframework.beans.factory.BeanCreationException;
import org.springframework.beans.factory.BeanDefinitionStoreException;
@@ -45,7 +47,6 @@ import org.springframework.integration.mail.SearchTermStrategy;
import org.springframework.integration.test.util.TestUtils;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.xml.sax.SAXParseException;
/**
* @author Mark Fisher
@@ -132,6 +133,7 @@ public class InboundChannelAdapterParserTests {
assertEquals(ImapMailReceiver.class, receiver.getClass());
Boolean value = (Boolean) new DirectFieldAccessor(receiver).getPropertyValue("shouldDeleteMessages");
assertTrue(value);
assertNotNull(TestUtils.getPropertyValue(receiver, "evaluationContext.beanResolver"));
}
@Test