Skip to content

fivesmallq/simple-properties

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

simple-properties

Maven Central Build Status License

Overview

  • implemented in plain Java with no dependencies
  • support UTF-8 for properties file
  • users can override the config with Java system properties, java -Dmyapp.foo.bar=10
  • substitute environment variables (logdir=${HOME}/logs)
  • merges multiple config files use @include.redis=redis.properties

Usage

To add a dependency on simple-properties using Maven, use the following:

<dependency>
    <groupId>im.nll.data</groupId>
    <artifactId>simple-properties</artifactId>
    <version>0.9.2</version>
</dependency>

To add a dependency using Gradle:

dependencies {
  compile 'im.nll.data:simple-properties:0.9.2'
}

Examples

  SimpleProperties props = SimpleProperties.readConfiguration("system.properties");
  Assert.assertEquals("https://github.com/fivesmallq/simple-properties", props.getStringProperty("base_url"));
  Assert.assertEquals("UTF-8", props.getStringProperty("MYSQL_CHARSET"));

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/fivesmallq/simple-properties.

About

Simple configuration library for Java using properties files

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages