spring-framework / org.springframework.web.reactive.result.view.script

Package org.springframework.web.reactive.result.view.script

Types

RenderingContext

open class RenderingContext

Context passed to ScriptTemplateView render function.

ScriptTemplateConfig

interface ScriptTemplateConfig

Interface to be implemented by objects that configure and manage a JSR-223 ScriptEngine for automatic lookup in a web environment. Detected and used by ScriptTemplateView.

ScriptTemplateView

open class ScriptTemplateView : AbstractUrlBasedView

An AbstractUrlBasedView subclass designed to run any template library based on a JSR-223 script engine.

If not set, each property is auto-detected by looking up a single ScriptTemplateConfig bean in the web application context and using it to obtain the configured properties.

The Nashorn JavaScript engine requires Java 8+ and may require setting the sharedEngine property to false in order to run properly. See ScriptTemplateConfigurer#setSharedEngine(Boolean) for more details.

ScriptTemplateViewResolver

open class ScriptTemplateViewResolver : UrlBasedViewResolver

Convenience subclass of UrlBasedViewResolver that supports ScriptTemplateView and custom subclasses of it.

The view class for all views created by this resolver can be specified via the #setViewClass(Class) property.

Note: When chaining ViewResolvers this resolver will check for the existence of the specified template resources and only return a non-null View object if a template is actually found.