Class RepositoryRestHandlerAdapter
java.lang.Object
org.springframework.context.support.ApplicationObjectSupport
org.springframework.web.context.support.WebApplicationObjectSupport
org.springframework.web.servlet.support.WebContentGenerator
org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter
org.springframework.data.rest.webmvc.RepositoryRestHandlerAdapter
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.beans.factory.BeanFactoryAware
,org.springframework.beans.factory.InitializingBean
,org.springframework.context.ApplicationContextAware
,org.springframework.core.Ordered
,org.springframework.web.context.ServletContextAware
,org.springframework.web.servlet.HandlerAdapter
public class RepositoryRestHandlerAdapter
extends org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter
RequestMappingHandlerAdapter
implementation that adds a couple argument resolvers for controller method
parameters used in the REST exporter controller. Also only looks for handler methods in the Spring Data REST provided
controller classes to help isolate this handler adapter from other handler adapters the user might have configured in
their Spring MVC context.- Author:
- Jon Brisbin, Oliver Gierke
-
Field Summary
Fields inherited from class org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter
INIT_BINDER_METHODS, MODEL_ATTRIBUTE_METHODS
Fields inherited from class org.springframework.web.servlet.support.WebContentGenerator
HEADER_CACHE_CONTROL, METHOD_GET, METHOD_HEAD, METHOD_POST
Fields inherited from class org.springframework.context.support.ApplicationObjectSupport
logger
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
ConstructorDescriptionRepositoryRestHandlerAdapter
(List<org.springframework.web.method.support.HandlerMethodArgumentResolver> argumentResolvers) Creates a newRepositoryRestHandlerAdapter
using the givenHandlerMethodArgumentResolver
s. -
Method Summary
Modifier and TypeMethodDescriptionvoid
int
getOrder()
protected boolean
supportsInternal
(org.springframework.web.method.HandlerMethod handlerMethod) Methods inherited from class org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter
createDataBinderFactory, createInvocableHandlerMethod, getArgumentResolvers, getBeanFactory, getCustomArgumentResolvers, getCustomReturnValueHandlers, getInitBinderArgumentResolvers, getLastModifiedInternal, getMessageConverters, getModelAndViewResolvers, getReactiveAdapterRegistry, getReturnValueHandlers, getWebBindingInitializer, handleInternal, invokeHandlerMethod, setArgumentResolvers, setAsyncRequestTimeout, setBeanFactory, setCacheSecondsForSessionAttributeHandlers, setCallableInterceptors, setContentNegotiationManager, setCustomArgumentResolvers, setCustomReturnValueHandlers, setDeferredResultInterceptors, setIgnoreDefaultModelOnRedirect, setInitBinderArgumentResolvers, setMessageConverters, setModelAndViewResolvers, setParameterNameDiscoverer, setReactiveAdapterRegistry, setRequestBodyAdvice, setResponseBodyAdvice, setReturnValueHandlers, setSessionAttributeStore, setSynchronizeOnSession, setTaskExecutor, setWebBindingInitializer
Methods inherited from class org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter
getLastModified, handle, setOrder, supports
Methods inherited from class org.springframework.web.servlet.support.WebContentGenerator
applyCacheControl, applyCacheSeconds, applyCacheSeconds, cacheForSeconds, cacheForSeconds, checkAndPrepare, checkRequest, getAllowHeader, getCacheControl, getCacheSeconds, getSupportedMethods, getVaryByRequestHeaders, isAlwaysMustRevalidate, isRequireSession, isUseCacheControlHeader, isUseCacheControlNoStore, isUseExpiresHeader, prepareResponse, preventCaching, setAlwaysMustRevalidate, setCacheControl, setCacheSeconds, setRequireSession, setSupportedMethods, setUseCacheControlHeader, setUseCacheControlNoStore, setUseExpiresHeader, setVaryByRequestHeaders
Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext
Methods inherited from class org.springframework.context.support.ApplicationObjectSupport
getApplicationContext, getMessageSourceAccessor, initApplicationContext, obtainApplicationContext, requiredContextClass, setApplicationContext
-
Constructor Details
-
RepositoryRestHandlerAdapter
public RepositoryRestHandlerAdapter(List<org.springframework.web.method.support.HandlerMethodArgumentResolver> argumentResolvers) Creates a newRepositoryRestHandlerAdapter
using the givenHandlerMethodArgumentResolver
s.- Parameters:
argumentResolvers
- must not be null.
-
-
Method Details
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Overrides:
afterPropertiesSet
in classorg.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter
-
getOrder
public int getOrder()- Specified by:
getOrder
in interfaceorg.springframework.core.Ordered
- Overrides:
getOrder
in classorg.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter
-
supportsInternal
protected boolean supportsInternal(org.springframework.web.method.HandlerMethod handlerMethod) - Overrides:
supportsInternal
in classorg.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter
-