標籤:master github control hub jsp 訪問 closed apache hid
一、必須依賴四個包,其中三個是springboot內建包,可以不寫版本號碼,有一個不在springboot中,需要設定版本號碼
1 <!--引入Spring Boot內嵌的Tomcat對Jsp的解析包--> 2 <dependency> 3 <groupId>org.apache.tomcat.embed</groupId> 4 <artifactId>tomcat-embed-jasper</artifactId> 5 </dependency> 6 7 <!--servlet依賴的jar包start--> 8 <dependency> 9 <groupId>javax.servlet</groupId>10 <artifactId>javax.servlet-api</artifactId>11 </dependency>12 13 <!--jsp依賴jar包start-->14 <dependency>15 <groupId>javax.servlet.jsp</groupId>16 <artifactId>javax.servlet.jsp-api</artifactId>17 <version>2.3.1</version>18 </dependency>19 20 <!--jstl標籤依賴的jar包start-->21 <dependency>22 <groupId>javax.servlet</groupId>23 <artifactId>jstl</artifactId>24 </dependency>
View Code
二、通過Controller訪問
三、查看源碼
https://github.com/liushaoye/sprinboot-yml/tree/master
IntelliJ IDEA 2017版 spring-boot2.0.4的整合JSP