SSL with Grizzly and Jersey

前端 未结 4 1603
一整个雨季
一整个雨季 2021-02-08 12:30

I\'m trying to get grizzly to use SSL encryption and still work fine with Jersey. I\'ve looked all over the Internet, and I find all kinds of different attempts at SSL with Griz

4条回答
  •  不思量自难忘°
    2021-02-08 13:12

    IMO you can use different Factory method to initialize secured Grizzly HttpServer:

    HttpServer secure = GrizzlyServerFactory.createHttpServer(BASE_URI_SECURED,
                            ContainerFactory.createContainer(HttpHandler.class, rc),
                            true,
                            new SSLEngineConfigurator(sslCon));
    

    If you initialize the server like this, you don't need to stop and reconfigure it again.

    Hope this will help.

提交回复
热议问题