I have several static pages which use thymeleaf templates. Is it secure/safe to setup one controller to do this? Now I can just add pages to the templates/public directory without having to keep adding controllers.
@RequestMapping(value = "/**", method = RequestMethod.GET)
public String defaultMapping(final HttpServletRequest request) {
String path="public"+((String) request.getAttribute( HandlerMapping.PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE ));
return path;
}