Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Mustache is the most popular at the moment. Upgrade to 4.3 immediately and work up from there. If you're on 4.1 you're missing security patches.
In generally I prefer to create SPAs, and expose APIs to provide data. The resource costs for rendering html on the server is massive when you could have clients doing the work instead. Spring MVC is antiquated as a paradigm. -
Shreevas54y@SortOfTested Thank you for your suggestion. This seems to be logicless templates where we cannot write the if-else conditions etc..
In my old velocity templates, I do have such conditions. -
nekokatt864yI've used freemarker and found it is easy enough to use, I only really had experience with flask's jinja2 in Python before now.
You could just add the velocity dependency manually and add a bean to interface with it probably though. -
See the most highly upvoted answer (not the accepted one) here: https://stackoverflow.com/questions...
You can still use it, but you need to do the configuration yourself and it's a bit of a pain.
Popular templating engines seem to come and go a bit like JS frameworks at the moment. Personally I'm all for Thymeleaf, but I daresay that'll disappear soon enough and be replaced by something else 🙃 -
nekokatt864yThere's nothing stopping you making a simple autoconfiguration springfactory and putting it up on maven central.
Pop dependabot on it and set up a basic release workflow on GitHub and as long as velocity doesn't change their API drastically, it should be mostly self-maintaining. It will then benefit anyone else in the same position :-)
Related Rants
Has anybody familiar with Spring and Velocity.
Spring 5 onwards Velocity support has been removed. I am currently using SPRING 4.1.6. I want to upgrade to 5.2.x.
Which is the best template engine suitable for this.
question
spring framework
velocity
java