<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
<scope>provided</scope>
</dependency>
SpringBoot文件目录创建 : src/main/webapp/WEB-INF/jsp
application.yml
spring:
mvc:
view:
prefix: /WEB-INF/page/
suffix: .jsp
@Controller
@RequestMapping("/file")
public class FileController {
@RequestMapping("/fileurls")
public String FileUrls() {
//ModelAndView mod = new ModelAndView("file");
System.out.println("OK");
return "filePath";
}
}