在Spring Boot应用程序中查看未解析

时间:2016-12-30 10:43:20

标签: spring-mvc spring-boot

控制器命中后,视图无法解析。 @RequestMapping工作正常但jsp没有得到解决。

以下是application.properties文件

server.servlet-path=/*
logging.level.org.springframework=DEBUG
spring.mvc.view.prefix=/WEB-INF/jsp/
spring.mvc.view.suffix=.jsp
spring.jpa.generate-ddl=true
spring.jpa.hibernate.ddl-auto=update

这是控制器:

@RequestMapping("/index")
public String getIndexPage() {
    System.out.println("Coming to controller");
    return "landing"

}

我正在点击网址:http://127.0.0.1:8080/project/index,我将收到空白页并显示以下错误:

16:01:38,447 ERROR [org.springframework.boot.context.web.ErrorPageFilter] (http-/0.0.0.0:8080-1) Cannot forward to error page for request [/index] 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

0 个答案:

没有答案