publicclassGTVGApplication {...privatefinalTemplateEngine templateEngine;...publicGTVGApplication(finalServletContext servletContext) { super();ServletContextTemplateResolver templateResolver =newServletContextTemplateResolver(servletContext);// HTML is the default mode, but we set it anyway for better understanding of codetemplateResolver.setTemplateMode(TemplateMode.HTML);// This will convert "home" to "/WEB-INF/templates/home.html"templateResolver.setPrefix("/WEB-INF/templates/");templateResolver.setSuffix(".html");// Template cache TTL=1h. If not set, entries would be cached until expelled by LRUtemplateResolver.setCacheTTLMs(Long.valueOf(3600000L));// Cache is set to true by default. Set to false if you want templates to// be automatically updated when modified.templateResolver.setCacheable(true);this.templateEngine=newTemplateEngine();this.templateEngine.setTemplateResolver(templateResolver);... }}