@Configuration
@ImportResource(value="classpath*:META-INF/spring-data-rest/**/*-export.xml")
public class RepositoryRestMvcConfiguration
extends java.lang.Object
RepositoryRestConfiguration
bean, which you can define in
your own ApplicationContext
(which can take the form of an XML file in the classpath at location
'META-INF/spring-data-rest/' with a name that ends with '-export.xml').Modifier and Type | Field and Description |
---|---|
protected JpaRepositoryExporter |
customJpaRepositoryExporter
RepositoryExporter implementation for exporting JPA repositories. |
protected RepositoryRestConfiguration |
repositoryRestConfig
Main configuration for the REST exporter.
|
protected ValidatingRepositoryEventListener |
validatingRepositoryEventListener
ApplicationListener implementation for invoking Validator instances assigned to specific domain types. |
Constructor and Description |
---|
RepositoryRestMvcConfiguration() |
Modifier and Type | Method and Description |
---|---|
BaseUriMethodArgumentResolver |
baseUriMethodArgumentResolver() |
UriToDomainObjectUriResolver |
domainObjectResolver()
A
UriResolver implementation that takes a URI and
turns
it
into a top-level domain object. |
org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver |
exceptionHandlerExceptionResolver()
Bean for looking up methods annotated with
ExceptionHandler . |
RepositoryAwareJacksonModule |
jacksonModule()
A special Jackson
Module implementation that configures converters for entities. |
JpaRepositoryExporter |
jpaRepositoryExporter()
Use the pre-defined
JpaRepositoryExporter defined by the user or create a default one. |
JsonSchemaController |
jsonSchemaController() |
RepositoryAwareMappingHttpMessageConverter |
mappingHttpMessageConverter()
Special Repository-aware
HttpMessageConverter that can deal with
entities and links. |
PagingAndSortingMethodArgumentResolver |
pagingAndSortingMethodArgumentResolver() |
org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor |
persistenceAnnotationBeanPostProcessor()
For getting access to the
EntityManagerFactory . |
RepositoryRestHandlerAdapter |
repositoryExporterHandlerAdapter()
Special
HandlerAdapter that only recognizes handler methods defined in the
RepositoryRestController class. |
RepositoryRestHandlerMapping |
repositoryExporterHandlerMapping()
Special
HandlerMapping that only recognizes handler methods defined in the
RepositoryRestController class. |
RepositoryRestController |
repositoryRestController()
The main REST exporter Spring MVC controller.
|
ServerHttpRequestMethodArgumentResolver |
serverHttpRequestMethodArgumentResolver() |
ValidatingRepositoryEventListener |
validatingRepositoryEventListener()
Use the pre-defined
ValidatingRepositoryEventListener defined by the user or create a default one. |
@Autowired(required=false) protected JpaRepositoryExporter customJpaRepositoryExporter
RepositoryExporter
implementation for exporting JPA repositories.@Autowired(required=false) protected ValidatingRepositoryEventListener validatingRepositoryEventListener
ApplicationListener
implementation for invoking Validator
instances assigned to specific domain types.@Autowired(required=false) protected RepositoryRestConfiguration repositoryRestConfig
@Bean public org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor persistenceAnnotationBeanPostProcessor()
EntityManagerFactory
.@Bean public JpaRepositoryExporter jpaRepositoryExporter()
JpaRepositoryExporter
defined by the user or create a default one.@Bean public ValidatingRepositoryEventListener validatingRepositoryEventListener()
ValidatingRepositoryEventListener
defined by the user or create a default one.@Bean public RepositoryAwareJacksonModule jacksonModule()
Module
implementation that configures converters for entities.@Bean public RepositoryAwareMappingHttpMessageConverter mappingHttpMessageConverter()
HttpMessageConverter
that can deal with
entities and links.@Bean public UriToDomainObjectUriResolver domainObjectResolver()
UriResolver
implementation that takes a URI
and
turns
it
into a top-level domain object.@Bean public RepositoryRestController repositoryRestController() throws java.lang.Exception
java.lang.Exception
@Bean public JsonSchemaController jsonSchemaController()
@Bean public BaseUriMethodArgumentResolver baseUriMethodArgumentResolver()
@Bean public PagingAndSortingMethodArgumentResolver pagingAndSortingMethodArgumentResolver()
@Bean public ServerHttpRequestMethodArgumentResolver serverHttpRequestMethodArgumentResolver()
@Bean public RepositoryRestHandlerAdapter repositoryExporterHandlerAdapter()
HandlerAdapter
that only recognizes handler methods defined in the
RepositoryRestController
class.@Bean public RepositoryRestHandlerMapping repositoryExporterHandlerMapping()
HandlerMapping
that only recognizes handler methods defined in the
RepositoryRestController
class.@Bean public org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver exceptionHandlerExceptionResolver()
ExceptionHandler
.