Example #1
0
  /**
   * 获取ZK prefix
   *
   * @return
   */
  @NoAuth
  @RequestMapping(value = "/prefix", method = RequestMethod.GET)
  @ResponseBody
  public ValueVo getPrefixUrl() {

    ValueVo confItemVo = new ValueVo();
    confItemVo.setStatus(Constants.OK);
    confItemVo.setValue(zooConfig.getZookeeperUrlPrefix());

    return confItemVo;
  }
Example #2
0
  /**
   * 获取Zookeeper地址
   *
   * @return
   */
  @NoAuth
  @RequestMapping(value = "/hosts", method = RequestMethod.GET)
  @ResponseBody
  public ValueVo getHosts() {

    ValueVo confItemVo = new ValueVo();
    confItemVo.setStatus(Constants.OK);
    confItemVo.setValue(zooConfig.getZooHosts());

    return confItemVo;
  }