apollo-demo/src/main/java/com/ctrip/framework/apollo/demo/api/ApolloConfigDemo.java/ApolloConfigDemo/main
class ApolloConfigDemo:  public static void main(String[] args) throws IOException {
    ApolloConfigDemo apolloConfigDemo = new ApolloConfigDemo();
    apolloConfigDemo.printEnvInfo();
    System.out.println(
        "Apollo Config Demo. Please input key to get the value.");
    while (true) {
      System.out.print("> ");
      String input = new BufferedReader(new InputStreamReader(System.in, Charsets.UTF_8)).readLine();
      if (input == null || input.length() == 0) {
        continue;
      }
      input = input.trim();
      try {
        if (input.equalsIgnoreCase("application")) {
          apolloConfigDemo.print("application");
          continue;
        }
        if (input.equalsIgnoreCase("xml")) {
          apolloConfigDemo.print("xml");
          continue;
        }
        if (input.equalsIgnoreCase("yaml") || input.equalsIgnoreCase("yml")) {
          apolloConfigDemo.print("yaml");
          continue;
        }
        if (input.equalsIgnoreCase("quit")) {
          System.exit(0);
        }
        apolloConfigDemo.getConfig(input);
      } catch (Throwable ex) {
        logger.error("some error occurred", ex);
      }
    }
  }