SpringBoot集成JSP
-
创建一个SpringBoot项目
-
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0modelVersion>
<parent>
<groupId>org.springframework.bootgroupId>
<artifactId>spring-boot-starter-parentartifactId>
<version>2.5.4version>
<relativePath/>
parent>
?
<groupId>com.example.springbootgroupId>
<artifactId>006-springboot-jspartifactId>
<version>1.0.0version>
?
<properties>
<java.version>11java.version>
properties>
?
<dependencies>
<dependency>
?
<groupId>org.springframework.bootgroupId>
<artifactId>spring-boot-starter-webartifactId>
dependency>
?
<dependency>
<groupId>org.apache.tomcat.embedgroupId>
<artifactId>tomcat-embed-jasperartifactId>
dependency>
?
dependencies>
?
<build>
?
?
<resources>
<resource>
<directory>src/main