https证书生成
keytool -genkey -v -alias tomcat -keyalg RSA -validity 3650 -keystore c:\tomcat\qi.keystore -dname "CN=localhost,OU=cn,O=cn,L=cn,ST=cn,c=cn" -storepass password -keypass password
查看证书详情
keytool -list -v -keystore qi.keystore
springBoot配置
server: port: 8081 httpPort: 8080 ssl: #证书的路径. key-store: classpath:qi.keystore #证书密码,请修改为您自己证书的密码. key-store-password: password key-alias: tomcat key-store-type: JKS Enabled: true
访问项目
http://localhost:8080/XXX或者https://localhost:8081/XXX