INT-4160: Port Scripts DSL
JIRA: https://jira.spring.io/browse/INT-4160 * Rename `Scripts.script()` to processor() for better context * Add `Scripts.messageSource()` for the `ScriptMessageSourceSpec` * Redo `DslScriptExecutingMessageProcessor` logic to deal with `GroovyScriptExecutingMessageProcessor` via reflection, since that class is a part of `SI-Groovy` module * Upgrade to `JRuby-9.1.5.0` * Get rid of reflection in the `DslScriptExecutingMessageProcessor` * Introduce `ScriptExecutingProcessorFactory` and its `GroovyAwareScriptExecutingProcessorFactory` extension in the `groovy` module * Register `GroovyAwareScriptExecutingProcessorFactory` as a bean via `GroovyIntegrationConfigurationInitializer` * Use bean for `ScriptExecutingProcessorFactory.BEAN_NAME` in the `DslScriptExecutingMessageProcessor` to populate `delegate` and fallback to the regular `ScriptExecutingMessageProcessor` instantiation if there is no such a `ScriptExecutingProcessorFactory.BEAN_NAME` bean
This commit is contained in:
committed by
Gary Russell
parent
47cd4e4540
commit
1871b11e85
@@ -0,0 +1 @@
|
||||
payload.split(',')
|
||||
@@ -0,0 +1 @@
|
||||
headers.type == 'good'
|
||||
@@ -0,0 +1 @@
|
||||
java.util.Date.new
|
||||
@@ -0,0 +1,3 @@
|
||||
(function(){
|
||||
return payload.length > 5 ? "longStrings" : "shortStrings";
|
||||
})();
|
||||
@@ -0,0 +1,7 @@
|
||||
class Transformer
|
||||
def transform(payload, arg)
|
||||
"ruby-#{payload}-#{arg}"
|
||||
end
|
||||
end
|
||||
|
||||
Transformer.new.transform(payload, foo)
|
||||
Reference in New Issue
Block a user