Examples of PropertyConfigurator


Examples of org.scf4j.props.PropertyConfigurator

    File configRoot = new File(args[0]);
    if (!configRoot.exists() || !configRoot.isDirectory()) {
      usage();
    }

    PropertyConfigurator configurator = new PropertyConfigurator();
    configurator.setConfigurationRoot(configRoot);
    configurator.setTypeCoercer(new MyTypeCoercer());

    try {
      Config config = configurator.getConfiguration(Config.class);

      System.out.println("Your configuration is: ");
      System.out.println("\tdate:   " + config.getDate());
      System.out.println("\tdouble: " + config.getDouble());
    } catch (ConfigurationException e) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.