Add support for using custom BeanNameGenerator.

Closes: #2951
This commit is contained in:
Christoph Strobl
2024-07-31 15:09:50 +02:00
parent 369b549b3c
commit af70648cb7
2 changed files with 103 additions and 0 deletions

View File

@@ -23,6 +23,7 @@ import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.springframework.beans.factory.FactoryBean;
import org.springframework.beans.factory.support.BeanNameGenerator;
import org.springframework.context.annotation.ComponentScan.Filter;
import org.springframework.context.annotation.Import;
import org.springframework.data.keyvalue.core.KeyValueOperations;
@@ -126,6 +127,13 @@ public @interface EnableRedisRepositories {
*/
Class<?> repositoryBaseClass() default DefaultRepositoryBaseClass.class;
/**
* Configure a specific {@link BeanNameGenerator} to be used when creating the repositoy beans.
* @return the {@link BeanNameGenerator} to be used or the base {@link BeanNameGenerator} interface to indicate context default.
* @since 3.4
*/
Class<? extends BeanNameGenerator> nameGenerator() default BeanNameGenerator.class;
/**
* Configures the name of the {@link KeyValueOperations} bean to be used with the repositories detected.
*