Annotation Type GuiceModule


  • @Target(TYPE)
    @Retention(RUNTIME)
    @Documented
    @Import(org.springframework.guice.annotation.GuiceModuleRegistrar.class)
    public @interface GuiceModule
    Annotation that decorates the whole application context and provides metadata to Guice if the context is used as a Module. Can be added to any @Configuration class (and if added to many then the filters are combined with logical OR). By default all beans in the context will be bound to Guice with all of their implemented interfaces. If you need to filter out which beans are added you can filter by class.
    Author:
    Dave Syer
    See Also:
    SpringModule, GuiceModuleMetadata
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      org.springframework.context.annotation.ComponentScan.Filter[] excludeFilters
      Specifies which types are not eligible for inclusion in Guice module.
      String[] excludeNames
      Specifies which bean names (by simple wildcard match) are not eligible for inclusion in Guice module.
      String[] excludePatterns
      Specifies which bean names (by regex) are not eligible for inclusion in Guice module.
      org.springframework.context.annotation.ComponentScan.Filter[] includeFilters
      Specifies which types are eligible for inclusion in Guice module.
      String[] includeNames
      Specifies which names (by simple wildcard match) are eligible for inclusion in Guice module.
      String[] includePatterns
      Specifies which names (by regex) are eligible for inclusion in Guice module.
    • Element Detail

      • includeFilters

        org.springframework.context.annotation.ComponentScan.Filter[] includeFilters
        Specifies which types are eligible for inclusion in Guice module.
        Returns:
        filters for inclusion
        Default:
        {}
      • excludeFilters

        org.springframework.context.annotation.ComponentScan.Filter[] excludeFilters
        Specifies which types are not eligible for inclusion in Guice module.
        Returns:
        filters for exclusion
        Default:
        {}
      • includePatterns

        String[] includePatterns
        Specifies which names (by regex) are eligible for inclusion in Guice module.
        Returns:
        regexes
        Default:
        {}
      • excludePatterns

        String[] excludePatterns
        Specifies which bean names (by regex) are not eligible for inclusion in Guice module.
        Returns:
        regexes
        Default:
        {}
      • includeNames

        String[] includeNames
        Specifies which names (by simple wildcard match) are eligible for inclusion in Guice module.
        Returns:
        bean names
        Default:
        {}
      • excludeNames

        String[] excludeNames
        Specifies which bean names (by simple wildcard match) are not eligible for inclusion in Guice module.
        Returns:
        bean names
        Default:
        {}