We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1618963 commit e65e32bCopy full SHA for e65e32b
config/src/main/java/org/springframework/security/config/annotation/web/configurers/CorsConfigurer.java
@@ -107,7 +107,7 @@ static class MvcCorsFilter {
107
* @return
108
*/
109
private static CorsFilter getMvcCorsFilter(ApplicationContext context) {
110
- if (context.getBeanNamesForType(CorsConfigurationSource.class).length > 0) {
+ if (context.containsBean(HANDLER_MAPPING_INTROSPECTOR_BEAN_NAME)) {
111
CorsConfigurationSource corsConfigurationSource = context
112
.getBean(HANDLER_MAPPING_INTROSPECTOR_BEAN_NAME, CorsConfigurationSource.class);
113
return new CorsFilter(corsConfigurationSource);
0 commit comments