Skip to content

Commit da12ad0

Browse files
committed
Make ReactiveSecurityAutoConfiguration back off without spring-webflux
Closes gh-16934
1 parent 6c7a6a6 commit da12ad0

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/reactive/ReactiveSecurityAutoConfiguration.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2018 the original author or authors.
2+
* Copyright 2012-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -27,6 +27,7 @@
2727
import org.springframework.context.annotation.Configuration;
2828
import org.springframework.security.config.annotation.web.reactive.EnableWebFluxSecurity;
2929
import org.springframework.security.web.server.WebFilterChainProxy;
30+
import org.springframework.web.reactive.config.WebFluxConfigurer;
3031

3132
/**
3233
* {@link EnableAutoConfiguration Auto-configuration} for Spring Security in a reactive
@@ -40,8 +41,8 @@
4041
*/
4142
@Configuration
4243
@EnableConfigurationProperties(SecurityProperties.class)
43-
@ConditionalOnClass({ Flux.class, EnableWebFluxSecurity.class,
44-
WebFilterChainProxy.class })
44+
@ConditionalOnClass({ Flux.class, EnableWebFluxSecurity.class, WebFilterChainProxy.class,
45+
WebFluxConfigurer.class })
4546
public class ReactiveSecurityAutoConfiguration {
4647

4748
@Configuration

0 commit comments

Comments
 (0)