StringProperties is Java Properties with Extra Features. Open Source Java project under Apache License v2.0
Current Stable Version is 1.0.1
import org.javastack.stringproperties.StringProperties;
public class Example {
public static void main(final String[] args) throws Throwable {
StringProperties p = new StringProperties();
p.setProperty("state", "awake");
p.setProperty("msg", "Hi ${user.name}, how are you ${state}?");
System.out.println(p.getPropertyEval("msg"));
}
}
- More examples in Example package
Add the dependency to your pom.xml:
<dependency>
<groupId>org.javastack</groupId>
<artifactId>stringproperties</artifactId>
<version>1.0.1</version>
</dependency>
Inspired in Java Properties and Spring-Placeholders.