I have some example controller with method which return home page as follow:
public class IndexController {
@RequestMapping(value="/", method=RequestMethod.GET)
public ModelAndView mainPage() {
return new ModelAndView("home");
}
}
In every page off my application I would like to have a link (on top or bottom of page- nevermind), which will point to my homepage controller method.
How can i construct this in thymeleaf?
- Is there some ready to use soultion that work out of the box?
- Or should I implement my own routing mechanism?