1,在eclipse中添加jetty插件 2,新建maven工程 3,run configrations...->jre->使用最新jdk 4,run as with jetty 5,输入 localhost:port/就可以访问了!