I need to enable HTTPS on a Spring Boot 2.0.5 application with a self-signed certificate, however, everything I've found so far in configurations is related to setting a property named
security.require-ssl=true
but it seems that on this Spring Boot version that property is deprecated... is any other way for enabling HTTPS on a Spring Boot app?
Check the Spring Boot 2.0 Migration Guide which recommends to use WebSecurityConfigurerAdapter
instead of the secure.*
properties. Using matchers you can have fine grained control when to enforce SSL, or just do something similar to ...
http.requiresChannel().anyRequest().requiresSecure() (...)
... in your Adapter configuration to enforce https for any request.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With