Restore compatibility with Jetty 8 when SSL is being used

ServerConnector is in different packages in Jetty 8 and Jetty 9 which
was leading to a NoClassDefFounderError when SSL was used with
Jetty 8.

This commit updates SslServerConnectorFactory to return an
AbstractConnector, a super class of ServerConnector, that is in the
same package in both Jetty 8 and Jetty 9. This class does not provide
a setPort method so the setting of the port has been pushed down into
the SslServerConnectorFactory implementation.

SSL samples for both Jetty 8 and Jetty 9 have been added to verify
SSL with both supported versions of Jetty.

Closes gh-1925
This commit is contained in:
Andy Wilkinson
2014-11-17 17:18:31 +00:00
parent c80ff4c555
commit bebf26d91e
17 changed files with 479 additions and 13 deletions

View File

@@ -40,7 +40,7 @@ import static org.junit.Assert.assertEquals;
@WebAppConfiguration
@IntegrationTest("server.port:0")
@DirtiesContext
public class SampleJettyApplicationTests {
public class SampleJetty8ApplicationTests {
@Value("${local.server.port}")
private int port;