学习spring boot 2.x时,使用jsp作为前端页面。在application.properties配置了jsp所在位置
spring.mvc.view.prefix:/WEB-INF/views/
spring.mvc.view.suffix:.jsp
启动spring boot时报错,找不到页面
Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Sun Mar 10 21:37:47 CST 2019
There was an unexpected error (type=Not Found, status=404).
No message available
服务器端日志输出为:
o.s.w.s.r.ResourceHttpRequestHandler : Path with "WEB-INF" or "META-INF": [WEB-INF/views/home.jsp]
原因是spring boot默认不使用jsp,需要在pom中引用jsp的编译程序:
<!--jsp页面使用jstl标签 -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
</dependency>
<!--用于编译jsp -->
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
<scope>provided</scope>
</dependency>
相关推荐
赠送jar包:spring-boot-configuration-processor-2.3.12.RELEASE.jar; 赠送原API文档:spring-boot-configuration-processor-2.3.12.RELEASE-javadoc.jar; 赠送源代码:spring-boot-configuration-processor-...
赠送jar包:spring-boot-autoconfigure-2.3.12.RELEASE.jar; 赠送原API文档:spring-boot-autoconfigure-2.3.12.RELEASE-javadoc.jar; 赠送源代码:spring-boot-autoconfigure-2.3.12.RELEASE-sources.jar; 赠送...
Error creating bean with name 'org.springframework.web.servlet.handler.SimpleUrlHandlerMapping#0' defined in ServletContext resource [/WEB-INF/springMVC-servlet.xml]: Initialization of bean failed;...
org.springframework.web-3.0.5.RELEASE.jar
spring-web-3.2.4.RELEASE.jar spring-aop-3.2.4.RELEASE.jar spring-webmvc-3.2.4.RELEASE.jar spring-jdbc-3.2.4.RELEASE.jar spring-tx-3.2.4.RELEASE.jar spring-context-support-3.2.4.RELEASE.jar spring-orm-...
赠送jar包:spring-boot-2.2.8.RELEASE.jar; 赠送原API文档:spring-boot-2.2.8.RELEASE-javadoc.jar; 赠送源代码:spring-boot-2.2.8.RELEASE-sources.jar; 赠送Maven依赖信息文件:spring-boot-2.2.8.RELEASE....
赠送jar包:spring-boot-actuator-autoconfigure-2.3.12.RELEASE.jar; 赠送原API文档:spring-boot-actuator-autoconfigure-2.3.12.RELEASE-javadoc.jar; 赠送源代码:spring-boot-actuator-autoconfigure-2.3.12....
org.springframework.spring-library-3.0.4.RELEASE.libd org.springframework.test-3.0.4.RELEASE.jar org.springframework.transaction-3.0.4.RELEASE.jar org.springframework.web.portlet-3.0.4.RELEASE.jar ...
本课程内容包括Spring简介、Spring Boot简介、安装JDK、安装Maven、第一个Spring Boot程序(使用Spring Initializr构建、Spring Boot代码讲解、安装Notepad++)、构建系统、代码、配置、三种方式运行程序、安装...
赠送jar包:spring-boot-test-2.2.8.RELEASE.jar; 赠送原API文档:spring-boot-test-2.2.8.RELEASE-javadoc.jar; 赠送源代码:spring-boot-test-2.2.8.RELEASE-sources.jar; 赠送Maven依赖信息文件:spring-boot-...
赠送jar包:spring-boot-2.3.12.RELEASE.jar; 赠送原API文档:spring-boot-2.3.12.RELEASE-javadoc.jar; 赠送源代码:spring-boot-2.3.12.RELEASE-sources.jar; 赠送Maven依赖信息文件:spring-boot-2.3.12....
org.springframework.spring-library-3.1.RELEASE.libd org.springframework.test-3.1.RELEASE.jar org.springframework.transaction-3.1.RELEASE.jar org.springframework.web.portlet-3.1.RELEASE.jar org....
spring-web-5.0.4.RELEASE.jar; spring-web-5.0.4.RELEASE.jar
spring-boot-2.1.3.RELEASE.jar -autoconfigure- -devtools- -maven-plugin- -starter- -starter-jdbc- -starter-json- -starter-logging- -starter-test- -starter-tomcat- -starter-web- -test- -test-...
spring.jar spring-aop.jar spring-aop.jar spring-beans.jar spring-hibernate3.jar spring-jdbc.jar spring-struts.jar spring-web.jar
赠送jar包:spring-boot-autoconfigure-2.0.6.RELEASE.jar; 赠送原API文档:spring-boot-autoconfigure-2.0.6.RELEASE-javadoc.jar; 赠送源代码:spring-boot-autoconfigure-2.0.6.RELEASE-sources.jar; 赠送...
赠送jar包:spring-boot-autoconfigure-2.2.0.RELEASE.jar; 赠送原API文档:spring-boot-autoconfigure-2.2.0.RELEASE-javadoc.jar; 赠送源代码:spring-boot-autoconfigure-2.2.0.RELEASE-sources.jar; 赠送...
.zip,基于Spring Boot 2.x的前后端分离开发平台X-Boot 前端:Vue iView Admin 后端:Spring Boot 2.x/Spring Security/JWT/Spring Data JPA Mybatis-Plus/Redis/Elasticsearch/Activiti 分布式限流/同步锁/验证码/...
spring-boot-starter-web-1.5.4.RELEASE.jar
赠送jar包:spring-boot-devtools-2.2.8.RELEASE.jar; 赠送原API文档:spring-boot-devtools-2.2.8.RELEASE-javadoc.jar; 赠送源代码:spring-boot-devtools-2.2.8.RELEASE-sources.jar; 赠送Maven依赖信息文件:...