spring boot 添加jsp支持注意事项

时间:2022-09-16 23:42:47

1.一定要使用war包
<packaging>war</packaging> 2.将provided改为compile,具体如下:
        <dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
<scope>provided</scope>
</dependency>
需要修改为
    <dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
<scope>compile</scope>
</dependency>