Expose RepositoryRestMvcBootConfiguration
If an application defines a custom RepositoryRestMvcConfiguration, all Spring Boot defaults are lots. While this sounds sensible, it can be confusing as Spring Boot exposes properties (`spring.data.rest.*`) that are no longer honored. RepositoryRestMvcBootConfiguration is now public and can be used as an extension point for those who need to customize the Spring Data REST configuration and keep boot's specific defaults. Fixes gh-2392
This commit is contained in:
@@ -1464,6 +1464,19 @@ repository types (Elasticsearch, Solr). Just change the names of the annotations
|
||||
respectively.
|
||||
|
||||
|
||||
[[howto-use-exposing-spring-data-repositories-rest-endpoint]]
|
||||
=== Expose Spring Data repositories as REST endpoint
|
||||
|
||||
Spring Data REST can expose the `Repository` implementations as REST endpoints for you as
|
||||
long as Spring MVC has been enabled for the application.
|
||||
|
||||
Spring Boot exposes as set of useful properties from the `spring.data.rest` namespace that
|
||||
customize the
|
||||
{spring-data-rest-javadoc}/core/config/RepositoryRestConfiguration.{dc-ext}[`RepositoryRestConfiguration`].
|
||||
If your application requires to define its own `RepositoryRestMvcConfiguration` consider
|
||||
extending from `RepositoryRestMvcBootConfiguration` instead as the latter provides namely
|
||||
the handling of `spring.data.rest` properties.
|
||||
|
||||
|
||||
[[howto-database-initialization]]
|
||||
== Database initialization
|
||||
|
||||
Reference in New Issue
Block a user