Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT

## org.springframework.config.java.annotation
Annotation Type Import

    @Target(value=TYPE)
    @Retention(value=RUNTIME)
    @Inherited
    @Documented
    public @interface Import

Annotation for importing other `Configuration` classes. Serves as an analog to the XML configuration's <import/> element.

### Example 1: Importing a single configuration class

     @Import(InfrastructureConfig.class)
     @Configuration
     public class MiddleTierConfig {
      @Bean public FooService fooService() { ... }
     }
     @Configuration
     public class InfrastructureConfig {
      @Bean public DataSource dataSource() { ... }
     }

### Example 2: Importing multiple configuration classes

     @Import({ InfrastructureConfig.class, AspectConfig.class })
     @Configuration
     public class MiddleTierConfig {
      @Bean public FooService fooService() { ... }
     }
     //...

Author:
  Chris Beams
See Also:
  `Configuration`

Required Element Summary
`java.lang.Class<?>[]` | `value`

Element Detail

### value

    public abstract java.lang.Class<?>[] value

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT