java.lang.Object
org.springframework.integration.scripting.dsl.Scripts

public final class Scripts
extends java.lang.Object
The factory for Dynamic Language Scripts (Groovy, Ruby, Python, JavaScript etc.).
Since:
5.0
  • Method Details

    • processor

      public static ScriptSpec processor​(org.springframework.core.io.Resource scriptResource)
      The factory method to produce 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;
       
      Parameters:
      scriptResource - the script file Resource
      Returns:
      the ScriptSpec instance
    • processor

      public static ScriptSpec processor​(java.lang.String scriptLocation)
      The factory method to produce ScriptSpec based on the script file location.
      Parameters:
      scriptLocation - the path to the script file. file:, ftp:, s3: etc. The classpath: can be omitted.
      Returns:
      the ScriptSpec instance
    • messageSource

      public static ScriptMessageSourceSpec messageSource​(org.springframework.core.io.Resource scriptResource)
      Factory for the 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;
       
      Parameters:
      scriptResource - the script Resource
      Returns:
      the ScriptMessageSourceSpec
    • messageSource

      public static ScriptMessageSourceSpec messageSource​(java.lang.String scriptLocation)
      Factory for the ScriptMessageSourceSpec based on the script location.
      Parameters:
      scriptLocation - the path to the script file. file:, ftp:, s3: etc. The classpath: can be omitted.
      Returns:
      the ScriptMessageSourceSpec