org.springframework.boot.web.servlet

Annotation Type ServletComponentScan

    • Element Detail

      • value

        @AliasFor(value="basePackages")
        public abstract String[] value
        Alias for the basePackages() attribute. Allows for more concise annotation declarations e.g.: @ServletComponentScan("org.my.pkg") instead of @ServletComponentScan(basePackages="org.my.pkg").
        Returns:
        the base packages to scan
        Default:
        {}
      • basePackages

        @AliasFor(value="value")
        public abstract String[] basePackages
        Base packages to scan for annotated servlet components. 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

        public abstract Class<?>[] basePackageClasses
        Type-safe alternative to basePackages() for specifying the packages to scan for annotated servlet components. The package of each class specified will be scanned.
        Returns:
        classes from the base packages to scan
        Default:
        {}