I have been developing an application currently using jsp pages. For a certain need , i need to have thymeleaf working also. Is this possible to do? and if so , what would be the best way to ensure the .html files are sent to the thymeleaf resolver and jsp's continue to be sent to their current resolver. . i currrently have this in my conf
<!-- Declare a view resolver -->
<bean id="viewResolver"
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix">
<value>/WEB-INF/jsp/</value>
</property>
<property name="suffix">
<value>.jsp</value>
</property>
<property name="order" value="1" />
</bean>
<!-- Declare a view resolver -->
<bean id="templateResolver"
class="org.thymeleaf.templateresolver.ServletContextTemplateResolver">
<property name="prefix" value="/WEB-INF/jsp/" />
<property name="suffix" value=".jsp" />
<property name="templateMode" value="HTML5" />
<property name="cacheable" value="true" />
</bean>
<bean id="templateEngine" class="org.thymeleaf.spring3.SpringTemplateEngine">
<property name="templateResolver" ref="templateResolver" />
</bean>
<bean class="org.thymeleaf.spring3.view.ThymeleafViewResolver">
<property name="templateEngine" ref="templateEngine" />
<property name="order" value="2" />
<property name="viewNames" value="thymeleaf/*" />
</bean>
Aucun commentaire:
Enregistrer un commentaire