Class HttpsRedirectConfigurer<H extends HttpSecurityBuilder<H>>
java.lang.Object
org.springframework.security.config.annotation.SecurityConfigurerAdapter<DefaultSecurityFilterChain,B>
org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer<HeadersConfigurer<H>,H>
org.springframework.security.config.annotation.web.configurers.HttpsRedirectConfigurer<H>
- Type Parameters:
H
- the type ofHttpSecurityBuilder
that is being configured
- All Implemented Interfaces:
SecurityConfigurer<DefaultSecurityFilterChain,
H>
public final class HttpsRedirectConfigurer<H extends HttpSecurityBuilder<H>>
extends AbstractHttpConfigurer<HeadersConfigurer<H>,H>
Specifies for what requests the application should redirect to HTTPS. When this
configurer is added, it redirects all HTTP requests by default to HTTPS.
Security Filters
The following Filters are populatedShared Objects Created
No shared objects are created.Shared Objects Used
The following shared objects are used:PortMapper
is used to configureHttpsRedirectFilter
- Since:
- 6.5
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Configure theSecurityBuilder
by setting the necessary properties on theSecurityBuilder
.requestMatchers
(RequestMatcher... matchers) Methods inherited from class org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer
disable, getSecurityContextHolderStrategy, withObjectPostProcessor, withObjectPostProcessor
Methods inherited from class org.springframework.security.config.annotation.SecurityConfigurerAdapter
addObjectPostProcessor, addObjectPostProcessor, and, getBuilder, init, postProcess, setBuilder
-
Constructor Details
-
HttpsRedirectConfigurer
public HttpsRedirectConfigurer()
-
-
Method Details
-
requestMatchers
-
configure
Description copied from interface:SecurityConfigurer
Configure theSecurityBuilder
by setting the necessary properties on theSecurityBuilder
.- Specified by:
configure
in interfaceSecurityConfigurer<DefaultSecurityFilterChain,
H extends HttpSecurityBuilder<H>> - Overrides:
configure
in classSecurityConfigurerAdapter<DefaultSecurityFilterChain,
H extends HttpSecurityBuilder<H>> - Throws:
Exception
-