Skip to content

Commit

Permalink
UTF-8 config added for ThymeLeaf
Browse files Browse the repository at this point in the history
  • Loading branch information
zubcevic committed Jul 22, 2019
1 parent 7d0a63a commit ea38973
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@
*/
@Configuration
public class MvcConfiguration extends WebMvcConfigurerAdapter {

private static final String UTF8 = "UTF-8";

@Autowired
@Qualifier("pluginTargetDirectory")
Expand All @@ -80,6 +82,7 @@ public TemplateResolver springThymeleafTemplateResolver(ApplicationContext appli
resolver.setSuffix(".html");
resolver.setOrder(1);
resolver.setCacheable(false);
resolver.setCharacterEncoding(UTF8);
resolver.setApplicationContext(applicationContext);
return resolver;
}
Expand All @@ -89,6 +92,7 @@ public LessonTemplateResolver lessonTemplateResolver(ResourceLoader resourceLoad
LessonTemplateResolver resolver = new LessonTemplateResolver(pluginTargetDirectory, resourceLoader);
resolver.setOrder(2);
resolver.setCacheable(false);
resolver.setCharacterEncoding(UTF8);
return resolver;
}

Expand All @@ -97,6 +101,7 @@ public AsciiDoctorTemplateResolver asciiDoctorTemplateResolver(Language language
AsciiDoctorTemplateResolver resolver = new AsciiDoctorTemplateResolver(language);
resolver.setCacheable(false);
resolver.setOrder(3);
resolver.setCharacterEncoding(UTF8);
return resolver;
}

Expand Down

0 comments on commit ea38973

Please sign in to comment.