@Configuration @ConditionalOnClass(value={org.springframework.security.authentication.AuthenticationManager.class,org.springframework.security.config.annotation.authentication.configurers.GlobalAuthenticationConfigurerAdapter.class}) @EnableConfigurationProperties @Import(value={SpringBootWebSecurityConfiguration.class,AuthenticationManagerConfiguration.class,BootGlobalAuthenticationConfiguration.class,SecurityDataConfiguration.class}) public class SecurityAutoConfiguration extends Object
Auto-configuration
for Spring Security. Provides an
AuthenticationManager
based on configuration bound to a
SecurityProperties
bean. There is one user (named "user") whose password is
random and printed on the console at INFO level during startup. In a webapp this
configuration also secures all web endpoints (except some well-known static resource
locations) with HTTP basic security. To replace all the default behaviours in a webapp
provide a @Configuration
with @EnableWebSecurity
. To just add your own
layer of application security in front of the defaults, add a @Configuration
of
type WebSecurityConfigurerAdapter
.Constructor and Description |
---|
SecurityAutoConfiguration() |
Modifier and Type | Method and Description |
---|---|
DefaultAuthenticationEventPublisher |
authenticationEventPublisher(ApplicationEventPublisher publisher) |
SecurityProperties |
securityProperties() |
@Bean @ConditionalOnMissingBean(value=org.springframework.security.authentication.AuthenticationEventPublisher.class) public DefaultAuthenticationEventPublisher authenticationEventPublisher(ApplicationEventPublisher publisher)
@Bean @ConditionalOnMissingBean public SecurityProperties securityProperties()
Copyright © 2016 Pivotal Software, Inc.. All rights reserved.