Spring / Spring Boot
How to enable SSL (HTTPS) support for a Spring Boot web application?
To enable SSL or HTTPS for your Spring Boot web application, place the certificate ( .p12 or .jks extension) under the resources folder, and define the server.ssl.* configuration in the application.properties.
server.port=8443 server.ssl.enabled=true server.ssl.key-alias=tomcatApp-localhost server.ssl.key-password=changeit server.ssl.key-store=classpath:keystore.jks server.ssl.key-store-provider=SUN server.ssl.key-store-type=JKS server.ssl.key-store-password=changeit
For yaml configuration, configure Spring Boot using the application.yml file located in the src/main/resources folder.
server: port: 8443 ssl: enabled: true key-alias: tomcatApp-localhost key-password: changeit key-store: classpath:keystore.jks key-store-provider: SUN key-store-type: JKS key-store-password: changei
More Related questions...