Using the Java keytool to generate free HTTPS certificate

Disclaimer: This article is a blogger original article, shall not be reproduced without the bloggers allowed. https://blog.csdn.net/qq_34579060/article/details/89496477

 keytool -genkey -alias name -keysize valid for the number of days the certificate key length -validity your certificate alias -keyalg key algorithm -keystore certificate store file location and save the file

Specific command:

     Find the JDK installation directory, execute the following command:

C:\Program Files\Java\jdk1.7.0_79\bin> keytool -genkey -alias songhttps -keyalg RSA -keystore song.p12 -keysize 2048 -validity 365

 SpringBoot of application.properties configuration

====================== HTTPS ========================= # 

# key file name 
server.ssl.key-Store = song.p12 
# key alias 
server.ssl.key-alias = songhttps 
password # cmd entered 
server.ssl.key-store-password = 123456

Guess you like

Origin blog.csdn.net/qq_34579060/article/details/89496477