spring_reference/IX. ‘How-to’ guides/67.10. Expose Spring Data r...

6 lines
643 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

### 67.10. 将Spring Data仓库暴露为REST端点
Spring Data REST能够将Repository的实现暴露为REST端点只要该应用启用Spring MVC。
Spring Boot暴露一系列来自`spring.data.rest`命名空间的有用属性来定制化[RepositoryRestConfiguration](http://docs.spring.io/spring-data/rest/docs/current/api/org/springframework/data/rest/core/config/RepositoryRestConfiguration.html)。如果需要提供其他定制你可以创建一个继承自SpringBootRepositoryRestMvcConfiguration的`@Configuration`类。该类功能和RepositoryRestMvcConfiguration相同但允许你继续使用`spring.data.rest.*`属性。