• 若依(ruoyi)之thymeleaf与jsp共存解决方案


    对应目前来说,新项目一般很少会使用jsp这项技术,但是老项目可能是有jsp开发的,这时候可能就会有这么一个需求,就是将老项目的代码移植到新框架上。本篇教程主要介绍,如何整合jsp和thymeleaf同时存在。经过测试,已完美整合。

    若依版本:4.7.3

    一、添加jsp依赖 

    先将ruoyi-admin/pom.xml文件中的spring-boot-starter-thymeleaf依赖先删除,

    再在ruoyi-framework/pom.xml文件中添加jsp相关依赖

    1. <dependency>
    2. <groupId>org.springframework.bootgroupId>
    3. <artifactId>spring-boot-starter-thymeleafartifactId>
    4. dependency>
    5. <dependency>
    6. <groupId>org.springframework.bootgroupId>
    7. <artifactId>spring-boot-starter-tomcatartifactId>
    8. dependency>
    9. <dependency>
    10. <groupId>org.apache.tomcat.embedgroupId>
    11. <artifactId>tomcat-embed-jasperartifactId>