由于使用jsp运行我的Spring Boot App,我最终得到了这个日志。
2017-12-29 13:30:52.412 WARN 12631 --- [nio-8080-exec-2]
o.s.web.servlet.PageNotFound No mapping found for HTTP
request with URI [/SpringBootTrial/] in DispatcherServlet with name
'dispatcherServlet'
2017-12-29 13:30:56.463 WARN 12631 --- [nio-8080-exec-3]
o.s.web.servlet.PageNotFound No mapping found for HTTP
request with URI [/SpringBootTrial/display] in DispatcherServlet with
name 'dispatcherServlet'
2017-12-29 13:30:56.464 ERROR 12631 --- [nio-8080-exec-3]
o.s.boot.web.support.ErrorPageFilter : Cannot forward to error
page for request [/welcome] as the response has already been
committed. As a result, the response may have the wrong status code.
If your application is running on WebSphere Application Server you may
be able to resolve this problem by setting
com.ibm.ws.webcontainer.invokeFlushAfterService to false
很明显,在Spring Boot中,不需要手动配置。那么,我该如何解决这个错误?
我无法解决如何解决问题。我在application.properties中配置了jsp解析器。
spring.mvc.view.prefix=/WEB-INF/view/
spring.mvc.view.suffix=.jsp
我在pom.xml中有tomcat-embedded-jasper。