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 ScriptMessageSourceSpec
messageSource
(String scriptLocation) Factory for theScriptMessageSourceSpec
based on the script location.static ScriptMessageSourceSpec
messageSource
(Resource scriptResource) Factory for theScriptMessageSourceSpec
based on theResource
.static ScriptSpec
The factory method to produceScriptSpec
based on the script file location.static ScriptSpec
The factory method to produceScriptSpec
based on theResource
.
-
Method Details
-
processor
The factory method to produceScriptSpec
based on theResource
. TheResource
must 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 produceScriptSpec
based 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 theScriptMessageSourceSpec
based on theResource
. TheResource
must 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 theScriptMessageSourceSpec
based on the script location.- Parameters:
scriptLocation
- the path to the script file.file:
,ftp:
,s3:
etc. Theclasspath:
can be omitted.- Returns:
- the
ScriptMessageSourceSpec
-