我使用 RestTemplate
RestController
为客户端和服务器制作了两个应用。
需要使用自签名证书加密 API,服务器端的“RestController”应仅响应已签名的请求。
Spring Boot RestTemplate
/RestController
是否可行?
- 怎么做
- 在客户端
- 在服务器端
最佳答案
Spring Boot 文档提供了有关如何配置服务器的信息: https://docs.spring.io/spring-boot/docs/current/reference/html/howto-embedded-servlet-containers.html#howto-configure-ssl
配置客户端 RestTemplate 看这里(4. The Spring RestTemplate with SSL) http://www.baeldung.com/httpclient-ssl
关于java - Spring Boot - 带有自签名证书的客户端服务器 REST API,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44249020/