spring_reference/IX. ‘How-to’ guides/64.15.2. Use Jetty 8 with G...

15 lines
534 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

### 64.15.2. 通过Gradle使用Jetty8
你可以设置`jetty.version`属性并排除相关的WebSocket依赖比如对于一个简单的webapp或service
```gradle
ext['jetty.version'] = '8.1.15.v20140411'
dependencies {
compile ('org.springframework.boot:spring-boot-starter-web') {
exclude group: 'org.springframework.boot', module: 'spring-boot-starter-tomcat'
}
compile ('org.springframework.boot:spring-boot-starter-jetty') {
exclude group: 'org.eclipse.jetty.websocket'
}
}
```