6.24.3 Step by step: supplying a template engine to the routing
Assuming you are already using routing in your module, but the router has no access to the template engine yet, then here you can find how to set this up.
Make sure you have the template module declared in your project's wiring.xml (if it's already there, then skip this step):
<artifact id="templateModule" groupId="org.kauriproject" artifactId="kauri-template-service-impl"/>
In the spring container of your module, import the template service using kauri:import-service (again, if it's already there, skip this step):
<kauri:import-service id="templateService"
service="org.kauriproject.template.service.TemplateService"/>
When constructing the router, pass the templateService via the RoutingConfig.
<bean id="router" factory-bean="routingService" factory-method="createRouter">
<constructor-arg ref="restletContext"/>
<constructor-arg ref="module"/>
<constructor-arg>
<bean class="org.kauriproject.routing.RoutingConfig">
<property name="templateService" ref="templateService"/>
</bean>
</constructor-arg>
</bean>
Previous