Annotation Interface AvroSchemaScan
@Retention(RUNTIME)
@Import(org.axonframework.extension.spring.conversion.avro.AvroSchemaPackages.Registrar.class)
@Target(TYPE)
@Documented
@Inherited
public @interface AvroSchemaScan
Configures the base packages used by autoconfiguration when scanning for classes containing Avro Schema. One of
basePackageClasses(), basePackages() or its alias value() may be specified to define
specific packages to scan. If specific packages are not defined scanning will occur from the package of the class
with this annotation.- Since:
- 4.11.0
- Author:
- Simon Zambrovski, Jan Galinski
- See Also:
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionClass<?>[]Type-safe alternative tobasePackages()for specifying the packages to scan for classes containing Avro Schemas.String[]Base packages to scan for classes containing Avro Schemas.String[]Alias for thebasePackages()attribute.
-
Element Details
-
basePackages
String[] basePackagesBase packages to scan for classes containing Avro Schemas.value()is an alias for (and mutually exclusive with) this attribute.Use
basePackageClasses()for a type-safe alternative to String-based package names.- Returns:
- the base packages to scan
- Default:
{}
-
basePackageClasses
Class<?>[] basePackageClassesType-safe alternative tobasePackages()for specifying the packages to scan for classes containing Avro Schemas. 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 purpose other than being referenced by this attribute.
- Returns:
- classes from the base packages to scan
- Default:
{}
-
value
Alias for thebasePackages()attribute. Allows for more concise annotation declarations e.g.:@AvroSchemaScan("org.my.pkg")instead of@AvroSchemaScan(basePackages="org.my.pkg").- Returns:
- the base packages to scan
- Default:
{}
-