Skip to content

Instantly share code, notes, and snippets.

@circlee
Created July 3, 2017 06:45
Show Gist options
  • Save circlee/9e7b30779941895ae601289367bcaa3b to your computer and use it in GitHub Desktop.
Save circlee/9e7b30779941895ae601289367bcaa3b to your computer and use it in GitHub Desktop.
TemplateService
import javax.inject.Inject;
import org.springframework.stereotype.Service;
import org.thymeleaf.TemplateEngine;
import org.thymeleaf.context.Context;
@Service
public class TemplateService {
@Inject
TemplateEngine templateEngine;
public String process(String templateName, Context context){
return templateEngine.process(templateName, context);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment