Annotation Type EnableEntityViews


@Retention(RUNTIME) @Target(TYPE) @Documented @Import(EntityViewRegistrar.class) public @interface EnableEntityViews
Annotation to enable entity view scanning. By enabling scanning, a bean for EntityViewConfiguration is made available.
Since:
1.2.0
Author:
Moritz Becker
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Class<?>[]
    Type-safe alternative to basePackages() for specifying the packages to scan for annotated components.
    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.
    Alias for basePackages().
  • Element Details

    • value

      @AliasFor("basePackages") String[] value
      Alias for basePackages().

      Allows for more concise annotation declarations if no other attributes are needed — for example, @ComponentScan("org.my.pkg") instead of @ComponentScan(basePackages = "org.my.pkg").

      Default:
      {}
    • basePackages

      @AliasFor("value") String[] basePackages
      Base packages to scan for annotated components.

      value() is an alias for (and mutually exclusive with) this attribute.

      Use basePackageClasses() for a type-safe alternative to String-based package names.

      Default:
      {}
    • basePackageClasses

      Class<?>[] basePackageClasses
      Type-safe alternative to basePackages() for specifying 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 purpose other than being referenced by this attribute.

      Default:
      {}
    • includeFilters

      org.springframework.context.annotation.ComponentScan.Filter[] includeFilters
      Specifies which types are eligible for component scanning. Further narrows the set of candidate components from everything in basePackages() to everything in the base packages that matches the given filter or filters.
      Default:
      {}
    • excludeFilters

      org.springframework.context.annotation.ComponentScan.Filter[] excludeFilters
      Specifies which types are not eligible for component scanning.
      Default:
      {}