Module io.jstach.opt.spring.webflux
Package io.jstach.opt.spring.webflux
Interface JStachioModelView
- All Superinterfaces:
org.springframework.web.reactive.result.view.View
One way to use JStachio with Spring Webflux is to use this special View that will
delegate to JStachio to render.
By default this view interface will use the static jstachio singleton which normally is the correct Spring wired version if configured correctly.
- Author:
- agentgt, dsyer
-
Field Summary
Fields inherited from interface org.springframework.web.reactive.result.view.View
BINDING_CONTEXT_ATTRIBUTE
-
Method Summary
Modifier and TypeMethodDescriptiondefault List<org.springframework.http.MediaType>
default JStachio
jstachio()
Returns the jstachio singleton by default.default Object
model()
The model to be rendered byjstachio()
.static JStachioModelView
Creates a spring view from a modeldefault reactor.core.publisher.Mono<Void>
render
(Map<String, ?> model, org.springframework.http.MediaType contentType, org.springframework.web.server.ServerWebExchange exchange) Methods inherited from interface org.springframework.web.reactive.result.view.View
isRedirectView
-
Method Details
-
render
default reactor.core.publisher.Mono<Void> render(Map<String, ?> model, org.springframework.http.MediaType contentType, org.springframework.web.server.ServerWebExchange exchange) - Specified by:
render
in interfaceorg.springframework.web.reactive.result.view.View
-
getSupportedMediaTypes
- Specified by:
getSupportedMediaTypes
in interfaceorg.springframework.web.reactive.result.view.View
-
jstachio
Returns the jstachio singleton by default.- Returns:
- stachio singleton by default.
- See Also:
-
model
The model to be rendered byjstachio()
.- Returns:
- model defaulting to
this
instance.
-
of
Creates a spring view from a model- Parameters:
model
- an instance of a class annotated withJStache
.- Returns:
- view ready for rendering
-