Externalized Properties alternatives and similar libraries
Based on the "Configuration" category.
Alternatively, view externalized-properties alternatives based on common mentions on social networks and blogs.
-
Configurate
A simple configuration library for Java applications providing a node structure, a variety of formats, and tools for transformation -
microconfig
Modern tool for microservice configuration management -
net.cactusthorn.config
Configuration library based on annotation processing
Access the most powerful time series database as a service
Do you think we are missing an alternative of Externalized Properties or a related project?
Popular Comparisons
README
Externalized Properties
A lightweight and extensible library to resolve application properties from various external sources.
Twelve Factor Methodology
Externalized Properties was inspired by the The Twelve Factor Methodology's section III. Config.
The goal of this library is to make it easy for applications to implement configuration best practices by providing easy-to-use APIs as well as providing the flexibility to choose where to store their configurations/properties.
๐ ๏ธ Installation
Gradle
implementation "io.github.joeljeremy7.externalizedproperties:core:${version}"
Maven
<dependency>
<groupId>io.github.joeljeremy7.externalizedproperties</groupId>
<artifactId>core</artifactId>
<version>${version}</version>
</dependency>
๐งฉ Java 9 Module Names
Externalized Properties jars are published with Automatic-Module-Name manifest attribute:
- Core -
io.github.joeljeremy7.externalizedproperties.core
- Database Resolver -
io.github.joeljeremy7.externalizedproperties.resolvers.database
Module authors can use above module names in their module-info.java:
module foo.bar {
requires io.github.joeljeremy7.externalizedproperties.core;
requires io.github.joeljeremy7.externalizedproperties.resolvers.database;
}
๐ Features
๐ [Property Resolution via Java Dynamic Proxies](docs/property-resolution.md) ([Why Dynamic Proxies?](docs/why-dynamic-proxies.md))
โจ Default/Fallback Values
โจ Non-static Property Names
โจ Variable Expansion
โจ Caching
โจ Eager Loading
โจ Automatic Cache Reload
๐ [Property Post-Processing](docs/property-post-processing.md)
โจ Symmetric/Asymmetric Decryption
๐ [Property Conversion](docs/property-conversion.md)
โจ Generic Type Conversion
๐๏ธ Quick Start
Given an interface:
public interface ApplicationProperties {
@ExternalizedProperty("java.home")
String javaHome();
@ExternalizedProperty("encrypted.property")
@Decrypt("MyDecryptor")
String encryptedProperty();
@ExternalizedProperty("java.version")
int javaVersion();
}
We can initialize and start resolving external configurations/properties by:
public static void main(String[] args) {
ExternalizedProperties externalizedProperties = buildExternalizedProperties();
// Proxied interface.
ApplicationProperties props = externalizedProperties.proxy(ApplicationProperties.class);
// Use properties.
String javaHome = props.javaHome();
String encryptedProperty = props.encryptedProperty();
int javaVersion = props.javaVersion();
}
private static ExternalizedProperties buildExternalizedProperties() {
return ExternalizedProperties.builder()
.withDefaults()
.resolvers(...)
.processors(...)
.converters(...)
.build();
}
*Note that all licence references and agreements mentioned in the Externalized Properties README section above
are relevant to that project's source code only.