Class ThymeleafResource
java.lang.Object
org.apache.juneau.rest.server.servlet.RestResource
org.apache.juneau.rest.server.view.ViewResource
org.apache.juneau.rest.server.view.thymeleaf.ThymeleafResource
Child-resource flavor of the
ThymeleafMixin mixin.
Mounts as a routed child via @Rest(children=ThymeleafResource.class)
under a parent at the subtree /thymeleaf and renders raw Thymeleaf templates by delegating to a
shared ThymeleafDispatcher worker — the same flavor-neutral RawTemplateDispatcher
implementation the mixin and servlet flavors hold, so the
three forms cannot drift.
See Also:
- Since:
- 10.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.juneau.rest.server.servlet.RestResource
RestResource.Builder<R extends RestResource,SELF extends RestResource.Builder<R, SELF>>, RestResource.DefaultBuilder<R extends RestResource> -
Constructor Summary
ConstructorsModifierConstructorDescriptionNo-arg constructor — uses a defaultThymeleafDispatcherworker.protectedThymeleafResource(ThymeleafDispatcher worker) Worker constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected RawTemplateDispatcherReturns the per-engineRawTemplateDispatcherthis child delegates raw template dispatch to.Methods inherited from class org.apache.juneau.rest.server.view.ViewResource
renderMethods inherited from class org.apache.juneau.rest.server.servlet.RestResource
builder, doLog, getContext, getPaths, getRequest, getResponse, getRestBuilder, log, log, setContext
-
Constructor Details
-
ThymeleafResource
public ThymeleafResource()No-arg constructor — uses a defaultThymeleafDispatcherworker. -
ThymeleafResource
Worker constructor.- Parameters:
worker- The shared flavor-neutral Thymeleaf dispatcher this child delegates raw dispatch to. Must not benull.
-
-
Method Details
-
dispatcher
Description copied from class:ViewResourceReturns the per-engineRawTemplateDispatcherthis child delegates raw template dispatch to.Typically the matching flavor-neutral
<Engine>Dispatcherworker (which implementsRawTemplateDispatcher). Nevernull.- Specified by:
dispatcherin classViewResource- Returns:
- The raw-template dispatcher. Never
null.
-