简体   繁体   中英

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.

That isn't really multiple SSL connections. If you look at it as incoming and outgoing requests. On the incoming request to support SSL the server has to emit a certificate. 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. If the certificate being validated is from a know root cert then the http client handles that on your behalf. 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. 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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