Skip to content

Latest commit

 

History

History
18 lines (12 loc) · 840 Bytes

File metadata and controls

18 lines (12 loc) · 840 Bytes

spring-boot-http-to-https-redirect

Example Spring Boot 2.0 Http to Https Redirect App

Small example project to show how to enable HTTPS and redirect HTTP to HTTPS with Spring Boot 2.0

Running

To run the application, open command link and run "mvn spring-boot:run" or alternatively you can run the program in the IDE of your choosing. This application uses Spring Boot 2.0 w/ Java9. If you do not have Java9 installed, you will need to change the pom.xml to the version of java you do have installed.

After running the application, you can access the Spring Actuator endpoint "/actuator/health"

Accept Cert

The certificate is self signed so you possibly will need to accept the cert by adding an exception in your browser.

Via HTTPS

https://localhost:8443/actuator/health

Via HTTP

http://localhost:8080/actuator/health