Annotation Interface EnableConfigurableComponents


@Documented @Retention(RUNTIME) @Target(TYPE) @Import(ConfigurableComponentsConfigurer.class) @API(status=STABLE, since="1.0") public @interface EnableConfigurableComponents
Annotation for automatic configuration of Configurable beans.

Example:

 class MyComponent implements Configurable {
     ...
 }
 
 @Configuration
 @EnableConfigurableComponents
 class AppConfig {
    ...
    @Bean
    public MyComponent myConfigurableComponent() {
        ...
    }
    ...
 }
 

See ConfigProviderCustomizer for details on the ConfigProvider configuration and how to customize it.

By default, the Configurer used to configure the Configurable components is not exposed as a bean. To expose it, set the exposeConfigurer attribute to true.

Since:
1.0
Version:
1.0, 2025-08
Author:
(w) Iker Hernaez
See Also:
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Whether to expose the Configurer bean used to configure the components.
  • Element Details

    • exposeConfigurer

      boolean exposeConfigurer
      Whether to expose the Configurer bean used to configure the components.

      If true, a bean of type Configurer will be registered in the application context with the name "orneConfigConfigurableComponentsConfigurer".

      Default is false.

      Returns:
      Whether to expose the Configurer bean.
      Default:
      false