Annotation Interface EnableGemfireRepositories
@Target(TYPE)
@Retention(RUNTIME)
@Documented
@Inherited
@Import(GemfireRepositoriesRegistrar.class)
public @interface EnableGemfireRepositories
Annotation to enable Apache Geode, Spring Data
Repositories
.- See Also:
-
Repository
-
Optional Element Summary
Modifier and TypeOptional ElementDescriptionClass<?>[]
Type-safe alternative tobasePackages()
to specify the packages to scan for annotated components.String[]
Base packages to scan for annotated components.org.springframework.context.annotation.ComponentScan.Filter[]
Specifies which types are not eligible for component scanning.org.springframework.context.annotation.ComponentScan.Filter[]
Specifies which types are eligible for component scanning.Configures the name of theGemfireMappingContext
bean definition to use when creating Repositories discovered through this annotation.Configures thelocation
of where to find the Spring Data named queries properties file.org.springframework.data.repository.query.QueryLookupStrategy.Key
Returns theQueryLookupStrategy.Key
of theQueryLookupStrategy
used to lookup queries for query methods.Class<?>
Configure theRepository
base class
used to createRepository
proxies for this particular configuration.Class<?>
Returns thepostfix
used when looking up customRepository
implementations.String[]
Alias for thebasePackages()
attribute.
-
Element Details
-
value
String[] valueAlias for thebasePackages()
attribute. Allows for more concise annotation declarations, e.g.@EnableGemfireRepositories("org.my.pkg")
instead of@EnableGemfireRepositories(basePackages="org.my.pkg")
.- Returns:
- a
String
array specifying the packages to search for Apache Geode Repositories. - See Also:
- Default:
- {}
-
basePackages
String[] basePackagesBase packages to scan for annotated components.value()
is an alias for (and mutually exclusive with) this attribute. UsebasePackageClasses()
for a type-safe alternative to String-based package names.- Returns:
- a
String
array specifying the packages to search for Apache Geode Repositories. - See Also:
- Default:
- {}
-
basePackageClasses
Class<?>[] basePackageClassesType-safe alternative tobasePackages()
to specify the packages to scan for annotated components. The package of each class specified will be scanned. Consider creating a special no-op marker class or interface in each package that serves no other purpose than being referenced by this attribute.- Returns:
- an array of
classes
used to determine the packages to scan for Apache Geode Repositories.
- Default:
- {}
-
includeFilters
org.springframework.context.annotation.ComponentScan.Filter[] includeFiltersSpecifies which types are eligible for component scanning. Further narrows the set of candidate components from everything inbasePackages()
to everything in the base packages that matches the given filter or filters.- Returns:
- an array of Filters used to specify Repositories to be included during the component scan.
- Default:
- {}
-
excludeFilters
org.springframework.context.annotation.ComponentScan.Filter[] excludeFiltersSpecifies which types are not eligible for component scanning.- Returns:
- an array of Filters used to specify Repositories to be excluded during the component scan.
- Default:
- {}
-
mappingContextRef
String mappingContextRefConfigures the name of theGemfireMappingContext
bean definition to use when creating Repositories discovered through this annotation. If not configured a defaultGemfireMappingContext
will be created.- Returns:
- the
bean name
of theMappingContext
used by a Repository to map entities to the underlying data store (i.e. Apache Geode).
- Default:
- ""
-
namedQueriesLocation
String namedQueriesLocationConfigures thelocation
of where to find the Spring Data named queries properties file. Defaults toMETA-INFO/gemfire-named-queries.properties
.- Returns:
- a
String
indicating the location of the named queries properties file.
- Default:
- ""
-
queryLookupStrategy
org.springframework.data.repository.query.QueryLookupStrategy.Key queryLookupStrategyReturns theQueryLookupStrategy.Key
of theQueryLookupStrategy
used to lookup queries for query methods. Defaults toQueryLookupStrategy.Key.CREATE_IF_NOT_FOUND
.- Returns:
- the
QueryLookupStrategy.Key
used to determine the query lookup and creation strategy. - See Also:
-
QueryLookupStrategy.Key
- Default:
- CREATE_IF_NOT_FOUND
-
repositoryBaseClass
Class<?> repositoryBaseClassConfigure theRepository
base class
used to createRepository
proxies for this particular configuration.- Returns:
- the
Repository
base class
used to createRepository
proxies. - Since:
- 1.7
- See Also:
- Default:
- org.springframework.data.gemfire.repository.support.SimpleGemfireRepository.class
-
repositoryFactoryBeanClass
Class<?> repositoryFactoryBeanClassConfigures theFactoryBean
Class
used to create eachRepository
instance. Defaults toGemfireRepositoryFactoryBean
.- Returns:
- the
FactoryBean
Class
used to create eachRepository
instance. - See Also:
- Default:
- org.springframework.data.gemfire.repository.support.GemfireRepositoryFactoryBean.class
-
repositoryImplementationPostfix
String repositoryImplementationPostfixReturns thepostfix
used when looking up customRepository
implementations. Defaults to Impl. For example, for aRepository
namedPersonRepository
, the corresponding implementation class will be looked up scanning forPersonRepositoryImpl
.- Returns:
- a
String
indicating the postfix to append to theRepository
interface name when looking up the customRepository
implementing class.
- Default:
- "Impl"
-