According to the documentation it is possible to use the Spring Reactive WebClient with a different server as Netty:
WebClient provides a higher level API over HTTP client libraries. By default it uses Reactor Netty but that is pluggable with a different ClientHttpConnector.
However, I was not able to find a way how to do this. If I simply change the dependency from Netty to Jetty like this:
compile('org.springframework.boot:spring-boot-starter-webflux') {
exclude group: 'org.springframework.boot', module: 'spring-boot-starter-reactor-netty'
}
compile group: 'org.springframework.boot', name: 'spring-boot-starter-jetty', version: '2.0.0.M5'
my application will fail to start:
2017-10-30 15:40:43.328 ERROR 20298 --- [ restartedMain] o.s.boot.SpringApplication : Application startup failed
java.lang.NoClassDefFoundError: reactor/ipc/netty/http/client/HttpClient
Obviously I need to do something more. But this github issue gives me the impression that WebClient cannot be used without Netty.
Is it possible to replace the Netty implementation of WebClient?