Package org.springframework.core.env

Examples of org.springframework.core.env.JOptCommandLinePropertySource


  public static void main(String... args) {
    OptionParser parser = new OptionParser();
    parser.accepts("greeting").withRequiredArg();
    OptionSet options = parser.parse(args);
    PropertySource<?> ps = new JOptCommandLinePropertySource(options);

    AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
    ctx.getEnvironment().getPropertySources().addLast(ps);
    ctx.register(Greeter.class);
    ctx.refresh();
View Full Code Here

TOP

Related Classes of org.springframework.core.env.JOptCommandLinePropertySource

Copyright © 2018 www.massapicom. 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.