Since I cannot add comment, I will write it here:
Check three things:
Does maven contain thymeleaf dependencies? something like this.
Do you have Thymeleaf resolver properly set: This is annotation example:
@Bean public ThymeleafViewResolver viewResolver() { ThymeleafViewResolver thymeleafViewResolver = new ThymeleafViewResolver(); thymeleafViewResolver.setTemplateEngine(templateEngine()); thymeleafViewResolver.setCharacterEncoding("UTF-8"); return thymeleafViewResolver; }
Does your view have proper html tag:
html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"