complate / complate-spring-mvc

complate integration for Spring MVC
2 stars 1 forks source link

Adds the possibility to set up "ENGINE_SCOPE" bindings #10

Closed plafue closed 7 years ago

plafue commented 7 years ago

Until now there was no possibility to modify the bindings of the underlying ScriptEngine. This way we can set up new bindings without exposing the ScriptEngine to the outside world. I'm open for suggestions how to make this more user friendly (e.g. alternative constructor?)

dwestheide commented 7 years ago

I think having an alternative constructor where you can add bindings directly would be a great thing to have. If I understand the use case correctly, you still want to be able to add bindings later on in the lifecycle of the ScriptEngine, right? So having the addEngineScopeBindings method is still necessary, even if there is a new alternative constructor?

plafue commented 7 years ago

Not really. At the time of this writing there's no requirement to modify the bindings beyond construction time. If you think it's cleaner to have an additional constructor for this purpose i'll rewrite the PR :+1:

dwestheide commented 7 years ago

I would prefer it that way, if it's not too much work. :)