Jetty还有WebAppContext吗?

Bla*_*man 0 java jetty spring-mvc

我正在尝试使用嵌入式实例运行我的spring MVC.我发现了这个问题:Jetty Embedded Spring应用程序

我使用的是jetty版本:7.6.2.v20120308,javax servlet:2.5

我正在使用IntelliJ,类WebAppContext似乎没有解析为任何包/命名空间.这个类是存在还是被替换了?

import org.eclipse.jetty.server.Server;
public static void main(String[] args) throws Exception {

        Server server = new Server(8080);

        WebAppContext ????????
}
Run Code Online (Sandbox Code Playgroud)

nde*_*rge 7

只是为了确保你的pom.xml是否包含这种依赖?

<dependency>
    <groupId>org.eclipse.jetty</groupId>
    <artifactId>jetty-webapp</artifactId>
    <version>7.6.2.v20120308</version>
</dependency>
Run Code Online (Sandbox Code Playgroud)