Package org.springside.examples.miniservice.ws.result

Examples of org.springside.examples.miniservice.ws.result.GetUserResult.buildResult()


    //校验请求参数
    try {
      Assert.notNull(id, "id参数为空");
    } catch (IllegalArgumentException e) {
      logger.error(e.getMessage());
      return result.buildResult(WSResult.PARAMETER_ERROR, e.getMessage());
    }

    //获取用户
    try {
      User entity = accountManager.getInitedUser(id);
View Full Code Here


      result.setUser(dto);
      return result;
    } catch (ObjectNotFoundException e) {
      String message = "用户不存在(id:" + id + ")";
      logger.error(message, e);
      return result.buildResult(WSResult.PARAMETER_ERROR, message);
    } catch (RuntimeException e) {
      logger.error(e.getMessage(), e);
      return result.buildDefaultErrorResult();
    }
  }
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.