The original description was: "Extend groovy:script tag to recieve custom MessageContextBindingCustomizer"
However, this particular issue ended up focusing on the the addition of the ScriptVariableGenerator for returning a Map of variables. That strategy is intended to be generic so that implementations should be able to work with other scripting languages that we support in the future. It is focused on simply returning a Map of key/value pairs, and the Message instance is provided to the strategy method.
In the case of Groovy, we happen to be using a GroovyObjectCustomizer to invoke the ScriptVariableGenerator. However, that is an implementation detail, and it will very likely change in the future if there is a better alternative for passing the Map of variables at runtime for script execution.
The linked issue (
INT-1784) might be of interest for those who really want to provide a GroovyObjectCustomizer rather than simply provide script variables. For example, if you are implementing a Groovy-based DSL and need to modify the groovy.lang.MetaClass, the "customizer" support would be appropriate.