java - Spring Boot - 带有自签名证书的客户端服务器 REST API

标签 java spring ssl spring-boot ssl-certificate

我使用 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/

相关文章:

java - For 循环内的 For 循环 - ListArrays - Android、Java!

java - 如何在构建的 jar 中包含文本文件? [NetBeans]

java - hibernate 找不到序列

java - 如何在Spring Cloud DataFlow中注册应用程序?

java - 如何为 "virtual files"列表创建 ZIP 文件并输出到 httpservletresponse

apache - EC2 SSL 不工作

使用 SSL 时出现 PHP Curl 错误

java - 导入自定义类 : several errors (e. g。 java:不是一个声明)

java - Sonal lint : change this condition so that it does not always evaluate to true

asp.net-mvc-3 - Controller 操作之外的 ASP.Net MVC 3 IF 语句