【发布时间】:2018-10-22 07:58:32
【问题描述】:
我正在尝试在我的 Spring Boot 应用程序中添加一个简单的 jsp 渲染。
@Controller
public class WelcomeController {
@RequestMapping("/index")
public String loginMessage(){
return "index";
}
}
解析器
spring.mvc.view.prefix=/WEB-INF/jsp/
spring.mvc.view.suffix=.jsp
和/src/main/webapp/WEB-INF/jsp/index.jsp
我添加了 sprng boot web stater 和 tomcat embed
compile('org.springframework.boot:spring-boot-starter-web')
compile('org.apache.tomcat.embed:tomcat-embed-jasper')
我遇到了这个问题
May 11, 2018 3:54:53 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [java.lang.NoClassDefFoundError: org/apache/tomcat/util/security/Escape] with root cause
java.lang.ClassNotFoundException: org.apache.tomcat.util.security.Escape
【问题讨论】:
标签: jsp spring-boot