添加四個坐標
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
<!--<scope>provided</scope>-->
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
目錄結構

application.properties配置視圖解析器

寫一個控制器提供跳轉

設置 工作路徑為$MODULE_DIR$,右側的下拉選可以選

如果沒有該選項,選擇本項目

運行成功


參考https://blog.csdn.net/chuan8898439/article/details/82958903
