Added documentation on how to integrate Spring Data REST with an existing Spring MVC application. Renamed a couple components to keep them consistent with the others.

This commit is contained in:
Jon Brisbin
2012-06-26 13:28:45 -05:00
parent b3290c190c
commit 395101497f
4 changed files with 45 additions and 8 deletions

View File

@@ -11,9 +11,9 @@ import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandl
/**
* @author Jon Brisbin
*/
public class RepositoryExporterHandlerAdapter extends RequestMappingHandlerAdapter {
public class RepositoryRestHandlerAdapter extends RequestMappingHandlerAdapter {
public RepositoryExporterHandlerAdapter() {
public RepositoryRestHandlerAdapter() {
setCustomArgumentResolvers(Arrays.asList(
new ServerHttpRequestMethodArgumentResolver(),
new PagingAndSortingMethodArgumentResolver()

View File

@@ -17,7 +17,7 @@ import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandl
/**
* @author Jon Brisbin
*/
public class RepositoryExporterHandlerMapping extends RequestMappingHandlerMapping {
public class RepositoryRestHandlerMapping extends RequestMappingHandlerMapping {
@Autowired
private EntityManagerFactory entityManagerFactory;
@@ -25,7 +25,7 @@ public class RepositoryExporterHandlerMapping extends RequestMappingHandlerMappi
private List<RepositoryExporter> repositoryExporters = Collections.emptyList();
private Set<String> repositoryNames = new HashSet<String>();
public RepositoryExporterHandlerMapping() {
public RepositoryRestHandlerMapping() {
setOrder(Ordered.HIGHEST_PRECEDENCE);
}

View File

@@ -77,12 +77,12 @@ public class RepositoryRestMvcConfiguration {
return new RepositoryRestController();
}
@Bean RepositoryExporterHandlerAdapter repositoryExporterHandlerAdapter() {
return new RepositoryExporterHandlerAdapter();
@Bean RepositoryRestHandlerAdapter repositoryExporterHandlerAdapter() {
return new RepositoryRestHandlerAdapter();
}
@Bean RepositoryExporterHandlerMapping repositoryExporterHandlerMapping() {
return new RepositoryExporterHandlerMapping();
@Bean RepositoryRestHandlerMapping repositoryExporterHandlerMapping() {
return new RepositoryRestHandlerMapping();
}
}