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:
Jon Brisbin
2012-10-02 09:58:52 -05:00
committed by Jon Brisbin
parent dbfd43c1a0
commit ce466d00ab

View File

@@ -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() {