貌似如今eclipse已经内置了jetty服务.因此,还使用百度经验的同窗可能会各类开喷.web
有时候就这样,习惯就行了.软件这东西,要时刻关注变化.change啦~~app
配置开始:eclipse
在maven的pom,xml文件里面能够指定jetty的运行版本之类的.webapp
eg:maven
<build> <!-- jetty插件 --> <plugin> <groupId>org.mortbay.jetty</groupId> <artifactId>jetty-maven-plugin</artifactId> <version>8.1.16.v20140903</version> <configuration> <scanIntervalSeconds>0</scanIntervalSeconds> <webApp> <contextPath>/</contextPath> <!-- 加载这个文件能够在运行时修改JS或者CSS --> <defaultsDescriptor>src/main/webapp/WEB-INF/webdefault.xml</defaultsDescriptor> </webApp> <connectors> <connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector"> <port>9091</port> <maxIdleTime>60000</maxIdleTime> </connector> </connectors> </configuration> </plugin> </build>
而后进行运行配置:Run-->runconfig..ui
在插件
全局设置里,jetty:run,下面那些勾选根据须要勾选.意思不明白就百度...code
OK,点击Run或者是Debug.服务就启动咯.server
Overxml