diff --git a/spring-data-rest-core/src/main/java/org/springframework/data/rest/core/StringToLdapNameConverter.java b/spring-data-rest-core/src/main/java/org/springframework/data/rest/core/StringToLdapNameConverter.java index 275385cb9..c09b9e4d3 100644 --- a/spring-data-rest-core/src/main/java/org/springframework/data/rest/core/StringToLdapNameConverter.java +++ b/spring-data-rest-core/src/main/java/org/springframework/data/rest/core/StringToLdapNameConverter.java @@ -25,7 +25,7 @@ * {@link Converter} to convert a {@link String} to a {@link LdapName}. * * @author Mark Paluch - * @since 3.1 + * @since 3.0.8 */ public enum StringToLdapNameConverter implements Converter { diff --git a/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/config/RepositoryRestMvcConfiguration.java b/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/config/RepositoryRestMvcConfiguration.java index 6fc32e772..58fc8f882 100644 --- a/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/config/RepositoryRestMvcConfiguration.java +++ b/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/config/RepositoryRestMvcConfiguration.java @@ -15,7 +15,6 @@ */ package org.springframework.data.rest.webmvc.config; -import javax.naming.Name; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; @@ -44,7 +43,6 @@ import org.springframework.context.support.ReloadableResourceBundleMessageSource; import org.springframework.core.Ordered; import org.springframework.core.convert.ConversionService; -import org.springframework.core.convert.converter.Converter; import org.springframework.core.io.ClassPathResource; import org.springframework.data.auditing.AuditableBeanWrapperFactory; import org.springframework.data.auditing.MappingAuditableBeanWrapperFactory; @@ -250,7 +248,7 @@ public DefaultFormattingConversionService defaultConversionService() { DefaultFormattingConversionService conversionService = new DefaultFormattingConversionService(); // Add Spring Data Commons formatters conversionService.addConverter(uriToEntityConverter(conversionService)); - conversionService.addConverter(stringToNameConverter()); + conversionService.addConverter(StringToLdapNameConverter.INSTANCE); addFormatters(conversionService); configurerDelegate.configureConversionService(conversionService); @@ -677,10 +675,6 @@ protected UriToEntityConverter uriToEntityConverter(ConversionService conversion return new UriToEntityConverter(persistentEntities(), repositoryInvokerFactory(conversionService), repositories()); } - protected Converter stringToNameConverter() { - return StringToLdapNameConverter.INSTANCE; - } - @Bean public ExcerptProjector excerptProjector() {