mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:26:12 +08:00
Make web security config require spring-security-web on classpath
Previously, SpringBootWebSecurityConfiguration required a web application and @EnableWebSecurity to be on the classpath. @EnableWebSecurity is in spring-security-config so this could lead to the configuration being active when spring-security-web isn't on the classpath but the rest of Spring Security is. This commit updates SpringBootWebSecurityConfiguration to also make it conditional on a class in spring-security-web. Fixes gh-2717
This commit is contained in:
parent
60c1a150b3
commit
219317e8c7
@ -87,7 +87,7 @@ import org.springframework.web.servlet.support.RequestDataValueProcessor;
|
||||
*/
|
||||
@Configuration
|
||||
@EnableConfigurationProperties
|
||||
@ConditionalOnClass({ EnableWebSecurity.class })
|
||||
@ConditionalOnClass({ EnableWebSecurity.class, AuthenticationEntryPoint.class })
|
||||
@ConditionalOnMissingBean(WebSecurityConfiguration.class)
|
||||
@ConditionalOnWebApplication
|
||||
public class SpringBootWebSecurityConfiguration {
|
||||
|
Loading…
Reference in New Issue
Block a user