Open narendraraghu opened 8 years ago
http://www.thymeleaf.org/doc/articles/standarddialect5minutes.html 2. https://github.com/furkanzumrut/SpringThymeleafExample
http://spring.io/blog/2012/10/30/spring-mvc-from-jsp-and-tiles-to-thymeleaf/
http://spring.io/blog/2012/10/30/spring-mvc-from-jsp-and-tiles-to-thymeleaf/
There are a few things that we can notice:
-This is an html file! You can actually preview it as a static file in your web browser. This feature is great for prototyping [1].
We are using a dedicated namespace in order to turn static html pages into dynamic views. All parts that require dynamic processing are prefixed with “th:”.
It’s simple to refer to the context path using ‘@{…}’. This is very easy to get wrong in plain JSPs [2].
${users} is resolved using Spring Expression Language. If I had a form, I would have used expressions such as *{user.name} to refer to form elements.
[1] We will not discuss prototyping any further in this article. However you can read this tutorial (http://www.thymeleaf.org/petclinic.html) if you would like to know more about it.
[2] In the first part of this article, when using
20130418-thymeleaf-130418151812-phpapp02 (2) (1).pptx