第一个SpringBoot程序、案例、Demo

第一个SpringBoot程序、案例、Demo

1. 创建SpringBoot项目

第一个SpringBoot程序、案例、Demo

2. SpringBoot项目的命名

第一个SpringBoot程序、案例、Demo

3. 设置项目为WEB项目

第一个SpringBoot程序、案例、Demo

4. 成功创建SpringBoot项目后的目录:

第一个SpringBoot程序、案例、Demo

-----------------------------------------------------------------------------------------------

下面介绍添加JSP依赖以及测试过程

1. 在pom.xml中添加JSP依赖

第一个SpringBoot程序、案例、Demo

第一个SpringBoot程序、案例、Demo

1 <!-- 下面都是JSP依赖 start --> 2 <!-- Spring Boot 内嵌的tomcat对jsp的解析包 --> 3 <dependency> 4 <groupId>org.apache.tomcat.embed</groupId> 5 <artifactId>tomcat-embed-jasper</artifactId> 6 </dependency> 7 8 <!-- Servlet 依赖的jar包 --> 9 <dependency> 10 <groupId>javax.servlet</groupId> 11 <artifactId>javax.servlet-api</artifactId> 12 </dependency> 13 14 <!-- jsp依赖jar包 --> 15 <dependency> 16 <groupId>javax.servlet.jsp</groupId> 17 <artifactId>javax.servlet.jsp-api</artifactId> 18 <version>2.3.1</version> 19 </dependency> 20 21 <!-- jstl 依赖的jar包 --> 22 <dependency> 23 <groupId>javax.servlet</groupId> 24 <artifactId>jstl</artifactId> 25 </dependency> 26 <!-- 下面都是JSP依赖 end -->

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/zyysff.html