Question is simple, what is the difference between the above dependencies? Does the first one enough for a springboot app or the second contains something special?
Asked
Active
Viewed 1,020 times
1 Answers
4
Artifact thymeleaf
is the Core library.
Artifact thymeleaf-spring4
allows to integrate Thymeleaf with the Spring Framework, especially (but not only) Spring MVC. Btw there are several Thymeleaf integration packages for different Spring versions are available at the moment:
thymeleaf-spring3, thymeleaf-spring4, thymeleaf-spring5.
Information from thymeleaf-spring official documentation:
Thymeleaf offers a set of Spring integrations that allow you to use it as a fully-featured substitute for JSP in Spring MVC applications.
These integrations will allow you to:
- Make the mapped methods in your Spring MVC @Controller objects forward to templates managed by Thymeleaf, exactly like you do with JSPs.
- Use Spring Expression Language (Spring EL) instead of OGNL in your templates.
- Create forms in your templates that are completely integrated with your form-backing beans and result bindings, including the use of property editors, conversion services and validation error handling.
- Display internationalization messages from message files managed by Spring (through the usual MessageSource objects).
- Resolve your templates using Spring’s own resource resolution mechanisms.
If you use Spring Boot, you can just use the spring-boot-starter-thymeleaf dependency. It already contains the above two dependencies as well as some others.

DimaSan
- 12,264
- 11
- 65
- 75