Spring Boot整合Thymeleaf的版本兼容性问题

   2024-09-30 9920
核心提示:在整合Spring Boot和Thymeleaf时,需要确保它们的版本兼容。以下是一些建议的版本组合:Spring Boot 2.5.x 和 Thymeleaf 3.0.x在

在整合Spring Boot和Thymeleaf时,需要确保它们的版本兼容。以下是一些建议的版本组合:

Spring Boot 2.5.x 和 Thymeleaf 3.0.x在pom.xml文件中添加以下依赖:

<dependency>    <groupId>org.springframework.boot</groupId>    <artifactId>spring-boot-starter-thymeleaf</artifactId></dependency><dependency>    <groupId>org.thymeleaf</groupId>    <artifactId>thymeleaf</artifactId>    <version>3.0.12.RELEASE</version></dependency><dependency>    <groupId>org.thymeleaf</groupId>    <artifactId>thymeleaf-spring5</artifactId>    <version>3.0.12.RELEASE</version></dependency>

Spring Boot 2.4.x 和 Thymeleaf 3.0.x在pom.xml文件中添加以下依赖:

<dependency>    <groupId>org.springframework.boot</groupId>    <artifactId>spring-boot-starter-thymeleaf</artifactId></dependency><dependency>    <groupId>org.thymeleaf</groupId>    <artifactId>thymeleaf</artifactId>    <version>3.0.11.RELEASE</version></dependency><dependency>    <groupId>org.thymeleaf</groupId>    <artifactId>thymeleaf-spring5</artifactId>    <version>3.0.11.RELEASE</version></dependency>

Spring Boot 2.3.x 和 Thymeleaf 3.0.x在pom.xml文件中添加以下依赖:

<dependency>    <groupId>org.springframework.boot</groupId>    <artifactId>spring-boot-starter-thymeleaf</artifactId></dependency><dependency>    <groupId>org.thymeleaf</groupId>    <artifactId>thymeleaf</artifactId>    <version>3.0.11.RELEASE</version></dependency><dependency>    <groupId>org.thymeleaf</groupId>    <artifactId>thymeleaf-spring5</artifactId>    <version>3.0.11.RELEASE</version></dependency>

Spring Boot 2.2.x 和 Thymeleaf 3.0.x在pom.xml文件中添加以下依赖:

<dependency>    <groupId>org.springframework.boot</groupId>    <artifactId>spring-boot-starter-thymeleaf</artifactId></dependency><dependency>    <groupId>org.thymeleaf</groupId>    <artifactId>thymeleaf</artifactId>    <version>3.0.11.RELEASE</version></dependency><dependency>    <groupId>org.thymeleaf</groupId>    <artifactId>thymeleaf-spring5</artifactId>    <version>3.0.11.RELEASE</version></dependency>

请注意,这些版本组合是基于我的知识截止日期的,可能会随着时间的推移而发生变化。建议查看官方文档或者在Stack Overflow等社区寻求最新的兼容性信息。

 
举报打赏
 
更多>同类物流大全
推荐图文
推荐物流大全
点击排行

网站首页  |  关于我们  |  联系方式 | 网站留言    |  赣ICP备2021007278号