甩祸 发表于 2017-2-25 13:34:07

【Maven+Jetty】配置简单例子

引用

【Maven+Jetty】配置简单例子
1.pom.xml

<build>
<finalName>springweb</finalName>
<plugins>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>8.1.5.v20120716</version>
<configuration>
<stopPort>9966</stopPort>
<stopKey>foo</stopKey>
<scanIntervalSeconds>10</scanIntervalSeconds>
<webApp>
<contextPath>/teff</contextPath>
</webApp>
</configuration>
</plugin>
</plugins>
</build>

2.DOS命令 启动jetty服务器

e:\springmvc\hello>mvn -Djetty.port=8888jetty:run


3.访问url
http://localhost:8888/teff
页: [1]
查看完整版本: 【Maven+Jetty】配置简单例子