Right, those mappings are for the layoutMap property which is the rudimentary layout system that we developed. All that says is that if any view is returned that starts with account/, then wrap that view within the layout/accountLayout layout.
This ViewResolver is not actually resolving the template itself, it delegates to the TemplateResolver which I mentioned in my post. So based on the definition that I posted of the blWebTemplateResolver, if you create a file in the site/src/main/webapp/WEB-INF/templates/foo.html, then you can simply return "foo" from your controller:
Code: Select all
@RequestMapping("/showfoo")
public String showFoo(HttpServletRequest request, HttpServletResponse) {
return "foo";
}
and it will show the foo.html template with no other configuration necessary.
If you want to wrap that foo.html template inside of a bar layout, then that's where you would use the layoutMap property to configure that. Again though, we no longer recommend using the layoutMap and instead you should use a more full-featured layout system like the Thymeleaf Layout Dialect.