资 源 简 介
This tool allows configuration files (such as .properties and .xml) to be bound dynamically and painlessly into a Java interface. This has the benefit of cutting significantly on the boiler plate code of reading property files for every project. In addition, it supports serializing String properties as well as parameterized List properties.
This is accomplished through meta-programming. In a nutshell, you create simple Java interface and use annotations to specify what the configuration file will be and how the properties will be interpreted. Here is a simple example:
Property Files
MainConfiguration.java
```
@Configurable(name="app.properties")
public interface MainConfiguration {
@Property(key="prop1_key")
String getValue2ListAsString();
@Property(key="prop2_key")
List getValue2List();
}
```
In this example above, I created an interface called MainConfiguration. Using this interfa