Hi Daniel
Does Thymeleaf work with spring's ContentNegotiatingViewResolver? I want to use thymeleaf for my .html/.action views. If so, how would that look? Below is what I have for internalview.
Thanks,
Giang
Code:
<bean class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver" p:favorPathExtension="true" p:favorParameter="true" p:ignoreAcceptHeader="true"
p:defaultContentType="text/html">
<description>Depending on extension, return html with no decoration (.html), json (.json) or xml (.xml), remaining pages are decoracted</description>
<property name="mediaTypes">
<map>
<entry key="xml" value="application/xml" />
<entry key="json" value="application/json" />
<entry key="html" value="text/html" />
<entry key="action" value="text/html" />
</map>
</property>
<property name="defaultViews">
<list>
<bean class="org.springframework.web.servlet.view.xml.MarshallingView" p:marshaller-ref="xstreamMarshaller" />
<bean class="org.springframework.web.servlet.view.json.MappingJacksonJsonView" />
</list>
</property>
<property name="viewResolvers">
<list>
<bean id="nameViewResolver" class="org.springframework.web.servlet.view.BeanNameViewResolver">
<description>Maps a logical view name to a View instance configured as a Spring bean</description>
</bean>
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver" p:prefix="/WEB-INF/views/" p:suffix=".jsp" />
</list>
</property>
</bean>