Changed ApplicationRestConfig to just import RepositoryRestMvcConfiguration rather than extend it. It works the same either way. It's easier to override the default behavior by extending it, but if you're just defining validators and additional components, you can just use the @Import.
This commit is contained in:
@@ -15,6 +15,7 @@ import org.codehaus.jackson.map.module.SimpleSerializers;
|
||||
import org.codehaus.jackson.map.ser.std.SerializerBase;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Import;
|
||||
import org.springframework.core.convert.ConversionService;
|
||||
import org.springframework.core.convert.converter.Converter;
|
||||
import org.springframework.data.rest.test.webmvc.Person;
|
||||
@@ -30,7 +31,8 @@ import org.springframework.hateoas.ResourceProcessor;
|
||||
* @author Jon Brisbin
|
||||
*/
|
||||
@Configuration
|
||||
public class ApplicationRestConfig extends RepositoryRestMvcConfiguration {
|
||||
@Import(RepositoryRestMvcConfiguration.class)
|
||||
public class ApplicationRestConfig {
|
||||
|
||||
@SuppressWarnings({"unchecked"})
|
||||
@Bean public ConversionService customConversionService() {
|
||||
|
||||
Reference in New Issue
Block a user