Right click > inspect > on refresh indicator right click and select empty cache and hard reload. Maybe the css is not properly linked here, try:
<link rel="stylesheet" type="text/css" th:href="@{/style.css}"/> or <link rel="stylesheet" type="text/css" href="/style.css"/>
maybe try moving css to another location.
and what about the configuration?
@Bean
public SpringResourceTemplateResolver templateResolver() {
SpringResourceTemplateResolver templateResolver = new SpringResourceTemplateResolver();
templateResolver.setPrefix("classpath:/templates/");
templateResolver.setSuffix(".html");
templateResolver.setTemplateMode("HTML");
return templateResolver;
}