I am using Spring Boot v1.5.2.RELEASE and Thymeleaf.
I use <div th:include="praxis/header"></div>.
It works fine, but now I have a special requirement that I want to include a path in the controller like this:
<div th:include="praxis/header"></div>
@Controller
@RequestMapping(path = "/praxis")
public class UserController extends BaseController {
@GetMapping(value = "/header")
public ModelAndView praxisHeader(HttpServletRequest request) {
//do sth
return new ModelAndView("some other templates", "user", user);
}
}
It does not work because th:include can only include templates from the "resource" folder.
How can I include a template from the controller?