public final class Scripts extends Object
| Modifier and Type | Method and Description |
|---|---|
static ScriptMessageSourceSpec |
messageSource(Resource scriptResource)
Factory for the
ScriptMessageSourceSpec based on the Resource. |
static ScriptMessageSourceSpec |
messageSource(String scriptLocation)
Factory for the
ScriptMessageSourceSpec based on the script location. |
static ScriptSpec |
processor(Resource scriptResource)
The factory method to produce
ScriptSpec based on the Resource. |
static ScriptSpec |
processor(String scriptLocation)
The factory method to produce
ScriptSpec based on the script file location. |
public static ScriptSpec processor(Resource scriptResource)
ScriptSpec based on the Resource.
The Resource must represent the real file and can be injected like:
@Value("com/my/project/scripts/FilterScript.groovy")
private Resource filterScript;
scriptResource - the script file Resourcepublic static ScriptSpec processor(String scriptLocation)
ScriptSpec based on the script file location.scriptLocation - the path to the script file.
file:, ftp:, s3: etc.
The classpath: can be omitted.public static ScriptMessageSourceSpec messageSource(Resource scriptResource)
ScriptMessageSourceSpec based on the Resource.
The Resource must represent the real file and can be injected like:
@Value("com/my/project/scripts/FilterScript.groovy")
private Resource filterScript;
scriptResource - the script ResourceScriptMessageSourceSpecpublic static ScriptMessageSourceSpec messageSource(String scriptLocation)
ScriptMessageSourceSpec based on the script location.scriptLocation - the path to the script file.
file:, ftp:, s3: etc.
The classpath: can be omitted.ScriptMessageSourceSpec