在Postmain的 File》Settings》Genera选项卡中关闭 SSL certificate verification
Spring boot使用keytool配置ssl
2023-09-14 09:00:00 时间
1.使用keytool生成证书
https://www.cnblogs.com/baby123/p/12698757.html
2.spring boot
复制证书放在rescurces下
spring boot修改配置添加
server.port=8443 server.ssl.key-store=classpath:test.p12 server.ssl.key-store-password=123456 server.ssl.key-alias=test server.ssl.key-password=xyz123 server.ssl.keyStoreType=PKCS12
3.测试
添加控制器HelloController.java
@RequestMapping("/hello") public String hello() { return "Hello World!"; }
GET https://localhost:8443/hello
返回 Hello World!
注:
使用postman测试如果出现
-
The server couldn't send a response:Ensure that the backend is working properly
-
Self-signed SSL certificates are being blocked:Fix this by turning off 'SSL certificate verification' in Settings > General
-
Proxy configured incorrectlyEnsure that proxy is configured correctly in Settings > Proxy
-
Request timeout:Change request timeout in Settings > General
相关文章
- 玩转 Spring Boot 原理篇(核心注解知多少)(十)
- 为什么越来越多的人选择Spring Boot?
- Spring batch教程 之 spring batch简介
- Spring Boot介绍和环境配置
- spring boot 之 profile 配置
- spring boot整合shiro_Spring框架介绍及使用
- Spring Boot源码学习:自动配置与自定义注解详解
- Spring Boot、Spring Cloud 自定义配置文件(如何整合配置中心)
- Java项目分享-基于Spring Boot的迷你天猫商城
- spring官方文档 中文_Spring软件
- spring boot整合jsp的时候访问页面错误日志:Path with "WEB-INF" or "META-INF":
- 实战!3分钟搞定Spring Boot 多环境配置
- Spring Boot 2.6 正式发布:循环依赖默认禁止、增加SameSite属性...
- Spring Boot 2.x基础教程:使用Elastic Job的分片配置
- Spring Boot的安全配置(三)
- spring-boot项目的新建(出生)详解编程语言
- Spring Boot Actuator监控应用详解编程语言
- Spring Boot – Profile配置详解编程语言
- Spring Boot(二十):使用spring-boot-admin对spring-boot服务进行监控详解编程语言
- Spring Boot 2.x :通过 spring-boot-starter-hbase 集成 HBase
- Nacos 2.0的Spring Boot Starter来了!