mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:26:12 +08:00
Rename RepositoryRestMvcBootConfiguration
Rename RepositoryRestMvcBootConfiguration to SpringBootRepositoryRestMvcConfiguration so that it follows the same naming pattern as other custom Spring Boot configurations. See gh-2392
This commit is contained in:
parent
56e31a8c6b
commit
7943195d51
@ -46,7 +46,7 @@ import org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguratio
|
||||
@ConditionalOnMissingBean(RepositoryRestMvcConfiguration.class)
|
||||
@ConditionalOnClass(RepositoryRestMvcConfiguration.class)
|
||||
@AutoConfigureAfter(HttpMessageConvertersAutoConfiguration.class)
|
||||
@Import(RepositoryRestMvcBootConfiguration.class)
|
||||
@Import(SpringBootRepositoryRestMvcConfiguration.class)
|
||||
public class RepositoryRestMvcAutoConfiguration {
|
||||
|
||||
}
|
||||
|
@ -37,7 +37,8 @@ import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
* @since 1.2.2
|
||||
*/
|
||||
@Configuration
|
||||
public class RepositoryRestMvcBootConfiguration extends RepositoryRestMvcConfiguration {
|
||||
public class SpringBootRepositoryRestMvcConfiguration extends
|
||||
RepositoryRestMvcConfiguration {
|
||||
|
||||
@Autowired(required = false)
|
||||
private Jackson2ObjectMapperBuilder objectMapperBuilder;
|
@ -143,7 +143,7 @@ public class RepositoryRestMvcAutoConfigurationTests {
|
||||
|
||||
}
|
||||
|
||||
@Import({ TestConfiguration.class, RepositoryRestMvcBootConfiguration.class })
|
||||
@Import({ TestConfiguration.class, SpringBootRepositoryRestMvcConfiguration.class })
|
||||
protected static class TestConfigurationWithRestMvcBootConfig {
|
||||
|
||||
}
|
||||
|
@ -1486,16 +1486,15 @@ 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.
|
||||
customize the {spring-data-rest-javadoc}/core/config/RepositoryRestConfiguration.{dc-ext}[`RepositoryRestConfiguration`].
|
||||
If you need to provide additional customization, you can create a `@Configuration` class
|
||||
that extends `SpringBootRepositoryRestMvcConfiguration`. This class supports the same
|
||||
functionality as `RepositoryRestMvcConfiguration`, but allows you to continue using
|
||||
`spring.data.rest.*` properties.
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user