Annotation Interface EnableOrneConfig


@Documented @Retention(RUNTIME) @Target(TYPE) @EnablePreferredConfigInjection @EnableConfigurableComponents @API(status=STABLE, since="1.0") public @interface EnableOrneConfig
Annotation for enable default full Spring integration.

Example:

 @Configuration
 @EnableOrneConfig
 @ConfigPropertySource("altConfig")
 class AppConfig {
     ...
     @Bean
     public AltConfig altConfig() {
         return Config.as(
                 ...,
                 AltConfig.class);
     }
     ...
     @Bean
     public MyComponent myComponent(Config config) {
         ...
     }
     ...
     @Bean
     public AnotherComponent anotherComponent(
             @PreferredConfig(AltConfig.class) Config config) {
         ...
     }
     ...
     @Bean
     public Configurable myConfigurable() {
         ...
     }
     ...
 }
 

This is equivalent to manually enabling EnablePreferredConfigInjection and EnableConfigurableComponents, as ConfigPropertySource does not require any extra configuration:

 @Configuration
 @EnablePreferredConfigInjection
 @EnableConfigurableComponents
 class AppConfig {
     ...
 }
 

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

Since:
1.0
Version:
1.0, 2025-11
Author:
(w) Iker Hernaez
See Also: