Commit 0d136f05 authored by Madhura Bhave's avatar Madhura Bhave

Merge branch '2.1.x'

parents 8f0850a6 0a54fb73
...@@ -29,7 +29,6 @@ import org.springframework.core.annotation.AnnotatedElementUtils; ...@@ -29,7 +29,6 @@ import org.springframework.core.annotation.AnnotatedElementUtils;
import org.springframework.core.convert.converter.Converter; import org.springframework.core.convert.converter.Converter;
import org.springframework.core.convert.converter.GenericConverter; import org.springframework.core.convert.converter.GenericConverter;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.util.ClassUtils;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.ControllerAdvice; import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.reactive.config.WebFluxConfigurer; import org.springframework.web.reactive.config.WebFluxConfigurer;
...@@ -44,9 +43,6 @@ class WebFluxTypeExcludeFilter extends AnnotationCustomizableTypeExcludeFilter { ...@@ -44,9 +43,6 @@ class WebFluxTypeExcludeFilter extends AnnotationCustomizableTypeExcludeFilter {
private static final Set<Class<?>> DEFAULT_INCLUDES; private static final Set<Class<?>> DEFAULT_INCLUDES;
private static final String[] OPTIONAL_INCLUDES = {
"org.springframework.security.config.web.server.ServerHttpSecurity" };
static { static {
Set<Class<?>> includes = new LinkedHashSet<>(); Set<Class<?>> includes = new LinkedHashSet<>();
includes.add(ControllerAdvice.class); includes.add(ControllerAdvice.class);
...@@ -55,14 +51,6 @@ class WebFluxTypeExcludeFilter extends AnnotationCustomizableTypeExcludeFilter { ...@@ -55,14 +51,6 @@ class WebFluxTypeExcludeFilter extends AnnotationCustomizableTypeExcludeFilter {
includes.add(Converter.class); includes.add(Converter.class);
includes.add(GenericConverter.class); includes.add(GenericConverter.class);
includes.add(WebExceptionHandler.class); includes.add(WebExceptionHandler.class);
for (String optionalInclude : OPTIONAL_INCLUDES) {
try {
includes.add(ClassUtils.forName(optionalInclude, null));
}
catch (Exception ex) {
// Ignore
}
}
DEFAULT_INCLUDES = Collections.unmodifiableSet(includes); DEFAULT_INCLUDES = Collections.unmodifiableSet(includes);
} }
......
...@@ -25,7 +25,6 @@ import org.springframework.context.annotation.FilterType; ...@@ -25,7 +25,6 @@ import org.springframework.context.annotation.FilterType;
import org.springframework.core.type.classreading.MetadataReader; import org.springframework.core.type.classreading.MetadataReader;
import org.springframework.core.type.classreading.MetadataReaderFactory; import org.springframework.core.type.classreading.MetadataReaderFactory;
import org.springframework.core.type.classreading.SimpleMetadataReaderFactory; import org.springframework.core.type.classreading.SimpleMetadataReaderFactory;
import org.springframework.security.config.web.server.ServerHttpSecurity;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -54,7 +53,6 @@ public class WebFluxTypeExcludeFilterTests { ...@@ -54,7 +53,6 @@ public class WebFluxTypeExcludeFilterTests {
assertThat(excludes(filter, ExampleWeb.class)).isFalse(); assertThat(excludes(filter, ExampleWeb.class)).isFalse();
assertThat(excludes(filter, ExampleService.class)).isTrue(); assertThat(excludes(filter, ExampleService.class)).isTrue();
assertThat(excludes(filter, ExampleRepository.class)).isTrue(); assertThat(excludes(filter, ExampleRepository.class)).isTrue();
assertThat(excludes(filter, ExampleServerHttpSecurity.class)).isFalse();
} }
@Test @Test
...@@ -67,7 +65,6 @@ public class WebFluxTypeExcludeFilterTests { ...@@ -67,7 +65,6 @@ public class WebFluxTypeExcludeFilterTests {
assertThat(excludes(filter, ExampleWeb.class)).isFalse(); assertThat(excludes(filter, ExampleWeb.class)).isFalse();
assertThat(excludes(filter, ExampleService.class)).isTrue(); assertThat(excludes(filter, ExampleService.class)).isTrue();
assertThat(excludes(filter, ExampleRepository.class)).isTrue(); assertThat(excludes(filter, ExampleRepository.class)).isTrue();
assertThat(excludes(filter, ExampleServerHttpSecurity.class)).isFalse();
} }
@Test @Test
...@@ -80,7 +77,6 @@ public class WebFluxTypeExcludeFilterTests { ...@@ -80,7 +77,6 @@ public class WebFluxTypeExcludeFilterTests {
assertThat(excludes(filter, ExampleWeb.class)).isTrue(); assertThat(excludes(filter, ExampleWeb.class)).isTrue();
assertThat(excludes(filter, ExampleService.class)).isTrue(); assertThat(excludes(filter, ExampleService.class)).isTrue();
assertThat(excludes(filter, ExampleRepository.class)).isTrue(); assertThat(excludes(filter, ExampleRepository.class)).isTrue();
assertThat(excludes(filter, ExampleServerHttpSecurity.class)).isTrue();
} }
@Test @Test
...@@ -93,7 +89,6 @@ public class WebFluxTypeExcludeFilterTests { ...@@ -93,7 +89,6 @@ public class WebFluxTypeExcludeFilterTests {
assertThat(excludes(filter, ExampleWeb.class)).isFalse(); assertThat(excludes(filter, ExampleWeb.class)).isFalse();
assertThat(excludes(filter, ExampleService.class)).isTrue(); assertThat(excludes(filter, ExampleService.class)).isTrue();
assertThat(excludes(filter, ExampleRepository.class)).isFalse(); assertThat(excludes(filter, ExampleRepository.class)).isFalse();
assertThat(excludes(filter, ExampleServerHttpSecurity.class)).isFalse();
} }
@Test @Test
...@@ -106,7 +101,6 @@ public class WebFluxTypeExcludeFilterTests { ...@@ -106,7 +101,6 @@ public class WebFluxTypeExcludeFilterTests {
assertThat(excludes(filter, ExampleWeb.class)).isFalse(); assertThat(excludes(filter, ExampleWeb.class)).isFalse();
assertThat(excludes(filter, ExampleService.class)).isTrue(); assertThat(excludes(filter, ExampleService.class)).isTrue();
assertThat(excludes(filter, ExampleRepository.class)).isTrue(); assertThat(excludes(filter, ExampleRepository.class)).isTrue();
assertThat(excludes(filter, ExampleServerHttpSecurity.class)).isFalse();
} }
private boolean excludes(WebFluxTypeExcludeFilter filter, Class<?> type) private boolean excludes(WebFluxTypeExcludeFilter filter, Class<?> type)
...@@ -170,8 +164,4 @@ public class WebFluxTypeExcludeFilterTests { ...@@ -170,8 +164,4 @@ public class WebFluxTypeExcludeFilterTests {
} }
static class ExampleServerHttpSecurity extends ServerHttpSecurity {
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment