ozimov / spring-boot-email-tools

A set of services and tools for sending emails in a Spring Boot 1.5.x application using a Template Engine

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Template path gets removed not only extension.

nlcoredump opened this issue · comments

hi,

In ThymeleafTemplateService.java method mergeTemplateIntoString is returning thymeleafEngine.process(getNameWithoutExtension(trimmedTemplateReference), context)

This causes a template location "path/template" to given to the engine as "template". Because of this all email templates have to be in the root of the template dir, it would be nicer to accept templates with paths.

Maybe use removeExtension instead of the google getNameWithoutExtension which also removes the path.

Hi @nlcoredump thanks for spotting this bug and providing a possible fix.

I will add more tests for this case and publish the fix in roughly 24 hours.

Best

@nlcoredump problem fixed in release 0.6.1.
Thanks again for reporting.