1.购买证书,下载jks格式
2.将jks复制到resource目录
3.application配置
server:
port: 443
ssl:
key-store: classpath:SHA256withRSA_liuma.tech.jks
key-password: haDDZdqaXZre
key-store-type: JKS
http:
port: 80
4.启动类加入:用于转发http为https
@Bean
public TomcatServletWebServerFactory servletContainer