DATAREST-1397 - Polishing.
Removed the redeclaration of hasCorsConfigurationSource(…) in RepositoryRestHandlerMapping as it already inherits the one from BasePathAwareRestHandlerMapping. Removed @Override on BasePathAwareRestHandlerMapping.hasCorsConfigurationSource(…) as we need to compile against Spring 5.1, which doesn't expose the method. Downgrades from Spring HATEOAS 1.0 API usage in tests.
This commit is contained in:
@@ -112,11 +112,12 @@ public class BasePathAwareHandlerMapping extends RequestMappingHandlerMapping {
|
||||
return super.lookupHandlerMethod(lookupPath, new CustomAcceptHeaderHttpServletRequest(request, mediaTypes));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
/**
|
||||
* No {@code @Override} as the method is only available in Spring 5.2, but needed to make CORS work in general on it.
|
||||
*
|
||||
* @see org.springframework.web.servlet.handler.AbstractHandlerMapping#hasCorsConfigurationSource(java.lang.Object)
|
||||
* @see https://github.com/spring-projects/spring-framework/issues/22273
|
||||
*/
|
||||
@Override
|
||||
protected boolean hasCorsConfigurationSource(Object handler) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -190,15 +190,6 @@ public class RepositoryRestHandlerMapping extends BasePathAwareHandlerMapping {
|
||||
return AnnotationUtils.findAnnotation(type, RepositoryRestController.class) != null;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.web.servlet.handler.AbstractHandlerMapping#hasCorsConfigurationSource(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
protected boolean hasCorsConfigurationSource(Object handler) {
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.web.servlet.handler.AbstractHandlerMapping#extendInterceptors(java.util.List)
|
||||
|
||||
Reference in New Issue
Block a user