Class Scripts
java.lang.Object
org.springframework.integration.scripting.dsl.Scripts
The factory for Dynamic Language Scripts (Groovy, Ruby, Python, JavaScript etc.).
- Since:
- 5.0
- Author:
- Artem Bilan
-
Method Summary
Modifier and TypeMethodDescriptionstatic ScriptMessageSourceSpecmessageSource(String scriptLocation) Factory for theScriptMessageSourceSpecbased on the script location.static ScriptMessageSourceSpecmessageSource(Resource scriptResource) Factory for theScriptMessageSourceSpecbased on theResource.static ScriptSpecThe factory method to produceScriptSpecbased on the script file location.static ScriptSpecThe factory method to produceScriptSpecbased on theResource.
-
Method Details
-
processor
The factory method to produceScriptSpecbased on theResource. TheResourcemust represent the real file and can be injected like:@Value("com/my/project/scripts/FilterScript.groovy") private Resource filterScript;- Parameters:
scriptResource- the script fileResource- Returns:
- the ScriptSpec instance
-
processor
The factory method to produceScriptSpecbased on the script file location.- Parameters:
scriptLocation- the path to the script file.file:,ftp:,s3:etc. Theclasspath:can be omitted.- Returns:
- the ScriptSpec instance
-
messageSource
Factory for theScriptMessageSourceSpecbased on theResource. TheResourcemust represent the real file and can be injected like:@Value("com/my/project/scripts/FilterScript.groovy") private Resource filterScript;- Parameters:
scriptResource- the scriptResource- Returns:
- the
ScriptMessageSourceSpec
-
messageSource
Factory for theScriptMessageSourceSpecbased on the script location.- Parameters:
scriptLocation- the path to the script file.file:,ftp:,s3:etc. Theclasspath:can be omitted.- Returns:
- the
ScriptMessageSourceSpec
-