[英]Is there a way to make Jetty use SSL with java Code
I have an Eclipse RCP
Project with an Equinox Jetty
Web Server. 我有一个带有
Equinox Jetty
Web服务器的Eclipse RCP
项目。 I want the Jetty Server to use SSL
. 我希望Jetty服务器使用
SSL
。
I tested setting the Attributes in the Run Configuration of Eclipse and it works fine. 我测试了在Eclipse的“运行配置”中设置“属性”,并且工作正常。
-Dorg.eclipse.equinox.http.jetty.https.enabled=true
...
Now my Question: Is there a programmatic way to make Jetty
use SSL
? 现在我的问题是:是否有编程方式使
Jetty
使用SSL
?
将SSLConnector添加到您的连接器列表中,例如
SslConnector sslConnector = new SslSelectChannelConnector(sslContextFactory);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.