StringProperties is Java Properties with Extra Features. Open Source Java project under Apache License v2.0
Current Stable Version is 1.0.1
importorg.javastack.stringproperties.StringProperties;
publicclassExample {
publicstaticvoidmain(finalString[] args) throwsThrowable {
StringPropertiesp = newStringProperties();
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.