简体   繁体   English

spring是否支持多个ssl https连接?

[英]Does spring support multiple ssl https connections?

Is this supported? 支持吗? A controller with incoming https request on one port, the controller calling a https web service with RestTemplate and forwarding the service response. 一个在一个端口上带有传入https请求的控制器,该控制器使用RestTemplate调用https Web服务并转发服务响应。

That isn't really multiple SSL connections. 那实际上不是多个SSL连接。 If you look at it as incoming and outgoing requests. 如果将其视为传入和传出请求。 On the incoming request to support SSL the server has to emit a certificate. 在收到支持SSL的请求时,服务器必须发出证书。 It can be self signed or from a root authority. 它可以是自签名的,也可以来自根权限。 For the outgoing request the app is specifying that the protocol is HTTPS and then validating the server certificate is valid. 对于传出请求,应用程序指定协议为HTTPS,然后验证服务器证书是否有效。 If the certificate being validated is from a know root cert then the http client handles that on your behalf. 如果要验证的证书来自已知的根证书,则http客户端会代您处理该证书。 If not then you would have to add the root cert to your keychain. 如果不是,则必须将根证书添加到钥匙串中。

Now with that understanding there is nothing stopping you from configuring multiple incoming SSL endpoints and as well making multiple outgoing SSL requests. 现在,有了这种了解,您就不会阻止您配置多个传入SSL端点以及发出多个传出SSL请求。 It is just a matter of configuring the specific connections. 只需配置特定的连接即可。 For that I would refer you to the Spring reference documentation as it has a lot of information on it as well as examples. 为此,我将向您提供Spring参考文档,因为它具有大量的信息以及示例。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM