0

We have a Spring Boot application deployed under JBoss 6.4. We use Thymeleaf templates to build body emails to be sent to customers. We have a component with de following code:

@Autowired
private SpringTemplateEngine springTemplateEngine;

private String getText(String template, Map<String, Object> variables) {
    Context ctx = new Context(Locale.ENGLISH);
    ctx.setVariables(variables);
    return springTemplateEngine.process(template, ctx);
}

Templates are encoded using UTF-8 but special characters are shown wrong when application runs under JBoss 6.4. if application runs as a Spring Boot application, it's run ok.

The thymeleaf templates are look like the following:

<html th:inline="text" th:remove="tag">
Customer [[${customerName}]], with DNI [[${customerId}]]
...
</html>

When JBoss start the following properties are shown:

file.encoding = UTF-8
sun.jnu.encoding = UTF-8

JBoss was already configured to process http requests adding the properties below on stantalone.xml

Any idea?

I know what are the character encoding. This is not the problem. I asked why diacritic characters are not shown correctly when my Spring Boot/thymeleaf application is deployed under JBoss

0 Answers0