Annotation Driven Properties For Java (ADP4J) 是一个在 Java 对象中使用注解方式来注入配置属性的类库。
示例代码:
public class Bean { @SystemProperty("threshold") private int threshold; @Property(source = "myProperties.properties", key = "bean.name") private String beanName; //getters and setters omitted }