Update 64.15.1. Use Jetty 8 with Maven.md

master
qibaoguang 2015-03-25 22:44:34 +08:00
parent a99275dc4d
commit 3b1943cd19
1 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,31 @@
### 64.15.1. 通过Maven使用Jetty8
如果正在使用starter pom和parent你只需添加Jetty starter去掉WebSocket依赖并改变version属性比如对于一个简单的webapp或service
```xml
<properties>
<jetty.version>8.1.15.v20140411</jetty.version>
<jetty-jsp.version>2.2.0.v201112011158</jetty-jsp.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jetty</artifactId>
<exclusions>
<exclusion>
<groupId>org.eclipse.jetty.websocket</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
```