对应目前来说,新项目一般很少会使用jsp这项技术,但是老项目可能是有jsp开发的,这时候可能就会有这么一个需求,就是将老项目的代码移植到新框架上。本篇教程主要介绍,如何整合jsp和thymeleaf同时存在。经过测试,已完美整合。
若依版本:<version>4.7.3</version>
目录
一、添加jsp依赖
在ruoyi-framework/pom.xml文件中添加jsp依赖
需要将ruoyi-admin/pom.xml文件中的spring-boot-starter-thymeleaf依赖先删除。
<!--jsp-->
<!-- SpringBoot集成thymeleaf模板 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>