[Java Srping] Configuring embedded Tomcat to run on https (NOT production code)

Run bash to generate keystore.jks in src/mian/resources folder:

keytool -genKey -keyalg RSA -alias linkedin -keystore keystore.jks -storepass password -validity 4000 -keysize 2048

 

Modify application.yml file:

management:
  secutiry:
    enabled: false
server:
  ssl:
    key-store: classpath:keystore.jks
    key-store-password: password
    key-store-type: JKS
    key-alias: linkedin
    key-password: password

 

[Java Srping] Configuring embedded Tomcat to run on https (NOT production code)

 

Verify it is https:

http --verify=no https://localhsot:8080/api/greeting

Should be able to see the response.

 

上一篇:postman设置客户端证书


下一篇:VMware虚拟机的三种联网方法及原理