示例#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;
  }
示例#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;
  }