DATAVK-86 - Improved auto-template-registration infrastructure.

KeyValueRepositoryConfigurationExtension now need to report the default value for the KeyValueTemplate reference. We now only register a default template if the reference has not been customized. Changed the default reference value for Maps to mapKeyValueTemplate to allow individual defaults per store.

Removed obsolete RepositoryNamespaceHandler.

Original pull request: #1.
This commit is contained in:
Oliver Gierke
2014-12-01 16:35:28 +01:00
parent ff1338a99c
commit 5a14d7bc12
6 changed files with 96 additions and 73 deletions

View File

@@ -114,7 +114,7 @@ public @interface EnableMapRepositories {
*
* @return
*/
String keyValueTemplateRef() default "keyValueTemplate";
String keyValueTemplateRef() default "mapKeyValueTemplate";
/**
* Configures whether nested repository-interfaces (e.g. defined as inner classes) should be discovered by the

View File

@@ -44,6 +44,15 @@ public class MapRepositoryConfigurationExtension extends KeyValueRepositoryConfi
return "map";
}
/*
* (non-Javadoc)
* @see org.springframework.data.keyvalue.repository.config.KeyValueRepositoryConfigurationExtension#getDefaultKeyValueTemplateRef()
*/
@Override
protected String getDefaultKeyValueTemplateRef() {
return "mapKeyValueTemplate";
}
/*
* (non-Javadoc)
* @see org.springframework.data.keyvalue.repository.config.KeyValueRepositoryConfigurationExtension#getDefaultKeyValueTemplateBeanDefinition()