Jtwig integration with Spring Web MVC supports template caching which allows one to speed up the rendering. Specially in the case of high usage of include and extends tags. Caching allows one to skip the file system access (to read the template) and it also skips the creation of the final structure of the template resolving all the extends, blocks and include tags, which increases the access to the file system.
Some browsers, to resolve the content encoding, use a specific header field named “Content Type“. Spring Web MVC sends a default value, which if not changed, could result in the browser rendering the output with a wrong encoding, even if one specify the value in HTML meta tags.
Some may think that this is a template engine issue, however, that’s not the way Spring works. Here I’ll show you how to change it properly.
ThreadLocal, what an useful class. I’ve used it several times, I know what it allows me to do, but yet I don’t know how it is, actually, implemented, so in detail, what does it offers me?
© 2019 Joao Melo's Blog | Theme by Eleven Themes