Since I am dealing with property / property files, I have not really seen the standard defined for it in Java. But since you are starting with Java, you can start looking. Apache Commons Config User Guide . It provides a common configuration interface that you can use to load properties from various sources.
I recommend migrating from the Spring Framework . Spring is the de facto standard Javav application database. Next Spring link New configuration options should set most of the most innovative approaches to working with properties.
@Configuration public class AppConfig { private @Value("#{jdbcProperties.url}") String jdbcUrl; private @Value("#{jdbcProperties.username}") String username; private @Value("#{jdbcProperties.password}") String password }
It has some advanced features for working with properties, uses @Value to annotations, and automatically enters the required properties. In addition, this Spring abstracts your source data of your resource from your files.
source share