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:
committed by
Mark Fisher
parent
351af6b16b
commit
7f008b58c2
@@ -142,13 +142,8 @@ public class RedisStoreMessageSource extends IntegrationObjectSupport
|
||||
|
||||
@Override
|
||||
protected void onInit() throws Exception {
|
||||
if (this.getBeanFactory() != null){
|
||||
this.evaluationContext =
|
||||
this.evaluationContext =
|
||||
ExpressionUtils.createStandardEvaluationContext(this.getBeanFactory());
|
||||
}
|
||||
else {
|
||||
this.evaluationContext = ExpressionUtils.createStandardEvaluationContext();
|
||||
}
|
||||
}
|
||||
|
||||
public RedisStore getResource() {
|
||||
|
||||
@@ -23,6 +23,7 @@ import java.util.Properties;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import org.springframework.data.redis.connection.RedisConnection;
|
||||
import org.springframework.data.redis.connection.RedisConnectionFactory;
|
||||
import org.springframework.data.redis.core.BoundSetOperations;
|
||||
@@ -199,13 +200,8 @@ public class RedisStoreWritingMessageHandler extends AbstractMessageHandler {
|
||||
|
||||
@Override
|
||||
protected void onInit() throws Exception {
|
||||
if (this.getBeanFactory() != null) {
|
||||
this.evaluationContext =
|
||||
this.evaluationContext =
|
||||
ExpressionUtils.createStandardEvaluationContext(this.getBeanFactory());
|
||||
}
|
||||
else {
|
||||
this.evaluationContext = ExpressionUtils.createStandardEvaluationContext();
|
||||
}
|
||||
Assert.state(!this.mapKeyExpressionExplicitlySet ||
|
||||
(this.collectionType == CollectionType.MAP || this.collectionType == CollectionType.PROPERTIES),
|
||||
"'mapKeyExpression' can only be set for CollectionType.MAP or CollectionType.PROPERTIES");
|
||||
|
||||
Reference in New Issue
Block a user