Annotation Interface DefaultPropertiesPropertySources
@Target(TYPE)
@Retention(RUNTIME)
@Inherited
@Documented
@Import(io.microsphere.spring.config.context.annotation.DefaultPropertiesPropertySourcesLoader.class)
public @interface DefaultPropertiesPropertySources
A container annotation that holds multiple Java 8+
@DefaultPropertiesPropertySource
annotations.
This annotation is used to declare multiple DefaultPropertiesPropertySource
on a configuration class,
allowing the configuration of multiple property sources with default properties in a Spring application context.
Examples Usage
Basic Usage
@DefaultPropertiesPropertySources(value = {
@DefaultPropertiesPropertySource(name = "default1", properties = {"key1=value1", "key2=value2"}),
@DefaultPropertiesPropertySource(name = "default2", properties = {"key3=value3", "key4=value4"})
})
public class MyConfig {
}
Java 8+ @Repeatable
Usage
@DefaultPropertiesPropertySource(name = "default1", properties = {"key1=value1", "key2=value2"})
@DefaultPropertiesPropertySource(name = "default2", properties = {"key3=value3", "key4=value4"})
public class MyConfig {
}
- Since:
- 1.0.0
- Author:
- Mercy
- See Also:
-
DefaultPropertiesPropertySource
DefaultPropertiesPropertySourcesLoader
PropertySource
Configuration
-
Required Element Summary
Required Elements
-
Element Details
-
value
DefaultPropertiesPropertySource[] value
-