Add support for Kotlin JSR223 scripts (#2898)
* Add support for Kotlin JSR223 scripts * Add required Kotlin dependencies into the `spring-integration-scripting` module * Introduce `KotlinScriptExecutor` to interact with the `KotlinJsr223JvmLocalScriptEngineFactory` directly since there is no `META-INF/services/javax.script.ScriptEngineFactory` file in the Kotlin * Also set an `idea.use.native.fs.for.win` system property to `false` in this class to disable check for native support on Windows. (Might be removed in future Kotlin versions) * Move `ScriptParser.getLanguageFromFileExtension()` logic into the `ScriptExecutorFactory.deriveLanguageFromFileExtension()` since the same one must be applied in the `DslScriptExecutingMessageProcessor`, too. * Modify tests to reflect Kotlin support * Fix some test scripts to their official extensions * * Add JavaDocs * Polishing according Sonar objections
This commit is contained in:
committed by
Gary Russell
parent
9cc0cbe3bd
commit
7dff1d5416
@@ -1 +0,0 @@
|
||||
headers.type == 'good'
|
||||
@@ -0,0 +1 @@
|
||||
(bindings["headers"] as Map<String, *>)["type"] == "good"
|
||||
Reference in New Issue
Block a user