Java 类org.springframework.web.bind.annotation.RequestMapping 实例源码

项目:EasyHousing    文件:AdminRentController.java   
@RequestMapping(value="adminAddRentHouseDeal.do", method={RequestMethod.GET,RequestMethod.POST})
public ModelAndView adminAddRentHouseDeal(@RequestParam(value ="inputTime") @DateTimeFormat(pattern="yyyy-MM-dd") Date date,HttpServletRequest request, RentHouseDeal rentHouseDeal) {
    ModelAndView modelAndView = new ModelAndView();
    HttpSession session = request.getSession();
    rentHouseDeal.setRentTime(date);

    System.err.println("ctbb");
    System.err.println(date);
    System.err.println(rentHouseDeal.getRentHouseDay());
    System.err.println(rentHouseDeal.getRentTime());

    rentHouseDealDao.insertRentHouseDeal(rentHouseDeal);

    List<RentHouseDeal> rentHouseDealList = rentHouseDealDao.selectAll();
    session.setAttribute("rentHouseDealList", rentHouseDealList);

    modelAndView.setViewName("SystemUser/managerRentHistory");
    return modelAndView;
}
项目:restdocs-raml    文件:NotesController.java   
@ResponseStatus(HttpStatus.CREATED)
@RequestMapping(method = RequestMethod.POST)
HttpHeaders create(@RequestBody NoteInput noteInput) {
    Note note = new Note();
    note.setTitle(noteInput.getTitle());
    note.setBody(noteInput.getBody());
    note.setTags(getTags(noteInput.getTagUris()));

    this.noteRepository.save(note);

    HttpHeaders httpHeaders = new HttpHeaders();
    httpHeaders
            .setLocation(linkTo(NotesController.class).slash(note.getId()).toUri());

    return httpHeaders;
}
项目:mongodb-rdbms-sync    文件:SyncEventController.java   
@RequestMapping(value = "/retryEvent")
public void retryEvent(HttpServletRequest request, HttpServletResponse response) throws IOException {
    logger.info("Inside retryEvent");
    String syncEventStr = SyncConstants.EMPTY_STRING;
    String eventId = request.getParameter(EVENT_ID).trim().equalsIgnoreCase(SyncConstants.EMPTY_STRING)
            ? SyncConstants.EMPTY_STRING : request.getParameter(EVENT_ID).trim();
    boolean retryFailed = Boolean.valueOf(request.getParameter(RETRY_FAILED));
    boolean retryEntire = Boolean.valueOf(request.getParameter(RETRY_ENTIRE));
    boolean dropCollection = Boolean.valueOf(request.getParameter(DROP_COLLECTION));
    SyncEvent event = eventService.retryEvent(eventId, retryFailed, retryEntire, dropCollection);
    if (event != null) {
        syncEventStr = SyncMapAndEventEncoder.getEventJson(event);
    }
    response.setContentType(SyncConstants.CONTENT_TYPE_JSON);
    response.getWriter().println(syncEventStr);
    logger.info("retryEvent Completed");
}
项目:S3Mock    文件:FileStoreController.java   
/**
 * Adds an object to a bucket.
 *
 * http://docs.aws.amazon.com/AmazonS3/latest/API/mpUploadComplete.html
 *
 * @param bucketName the Bucket in which to store the file in.
 * @param uploadId id of the upload. Has to match all other part's uploads.
 * @param request {@link HttpServletRequest} of this request
 * @return {@link CompleteMultipartUploadResult}
 * @throws IOException in case of an error.
 */
@RequestMapping(
    value = "/{bucketName:.+}/**",
    params = {"uploadId"},
    method = RequestMethod.POST)
public ResponseEntity<CompleteMultipartUploadResult> completeMultipartUpload(
    @PathVariable final String bucketName,
    @RequestParam final String uploadId,
    final HttpServletRequest request) throws IOException {
  final String filename = filenameFrom(bucketName, request);

  final String eTag =
      fileStore.completeMultipartUpload(bucketName, filename, uploadId);

  return new ResponseEntity<>(
      new CompleteMultipartUploadResult(request.getRequestURL().toString(), bucketName,
          filename, eTag), new HttpHeaders(), HttpStatus.OK);
}
项目:batch-scheduler    文件:GroupDefineController.java   
@RequestMapping(value = "/task/list/delete", method = RequestMethod.POST)
@ResponseBody
public String deleteTaskList(HttpServletResponse response, HttpServletRequest request) {
    String json = request.getParameter("JSON");
    Set<String> args = new HashSet<>();

    List<GroupDefineDto> list = new GsonBuilder().create().fromJson(json,
            new TypeToken<List<GroupDefineDto>>() {
            }.getType());

    for (GroupDefineDto m : list) {
        args.add(m.getJobKey());
    }

    RetMsg retMsg = groupTaskService.deleteTask(args);
    if (retMsg.checkCode()) {
        return Hret.success(retMsg);
    }

    response.setStatus(retMsg.getCode());
    return Hret.error(retMsg);
}
项目:istio-ola    文件:OlaController.java   
@CrossOrigin
@RequestMapping(method = RequestMethod.GET, value = "/ola", produces = "text/plain")
@ApiOperation("Returns the greeting in Portuguese")
public String ola(HttpServletRequest request) {
  String hostname = System.getenv().getOrDefault("HOSTNAME", "Unknown");
  Enumeration<String> headerNames = request.getHeaderNames();

  StringBuffer headerMsg = new StringBuffer("{");

  while (headerNames.hasMoreElements()) {
    String headerName = headerNames.nextElement();
    String headerValue = request.getHeader(headerName);
    if (headerValue != null) {
      headerMsg.append(String.format("{\"%s\":\"%s\"}", headerName, headerValue));
      headerMsg.append(",");
    }
  }

  headerMsg.append("}");

  log.info("Request Headers:{}", headerMsg);
  return String.format("Olá de %s", hostname);
}
项目:webside    文件:RoleController.java   
@RequestMapping("withoutAuth/validateRoleName.html")
@ResponseBody
public Object validateRoleName(@RequestParam(value="name")String roleName){
    try
    {
        roleName = new String(roleName.getBytes("iso-8859-1"),"utf-8");
        RoleEntity roleEntity = roleService.findByName(roleName);
        if(roleEntity == null)
        {
            return true;
        }else
        {
            return false;
        }
    }catch(Exception e)
    {
        throw new AjaxException(e);
    }
}
项目:BackOffice    文件:LogController.java   
/**
 *
 * @param date - если даты нет - текущий день. За какой день взять лог
 * @param logName - обязательный параметр. Какой лог читать
 * @param entry - совпадение, по которому осуществляется поиск
 * @return - возвращается данные из лога по заданным параметрам в виде "text/plain"
 */
@RequestMapping(value="/logs/search", method = RequestMethod.GET, produces="text/plain")
public String searchInLog(
        @RequestParam(value="date", defaultValue="none") String date
        ,@RequestParam(value="logName", defaultValue="none") String logName
        ,@RequestParam(value="entry", defaultValue="none") String entry
) throws IOException, ParseException {
    LOG.info("\nИнициирован запрос \"/logs/search\" с параметрами:\nDate: "+date+"\nlogName: "+logName + "\nentry: "+entry);
    ArrayList<String> listOfAllDailyLogs;
    int consilence;//вхождение
    if(date.equals("none"))date = DATE_FORMAT.format(new Date());
    if(logName.equals("none")){return "Необходимо указать имя сервиса, лог которого вы ожидаете получить, в параметре logName, пример: ?date=2017-02-17&logName=core";}
    logModel = new LogModel(date);
    listOfAllDailyLogs = logModel.getListOfAllDailyLogs();
    consilence = logModel.getEntryIndex(listOfAllDailyLogs,logName);
    String logPath = listOfAllDailyLogs.get(consilence);
    ArrayList<String> logsResult = logModel.searchInLogByEntry(logPath,entry);
    return logModel.convertLogToString(logsResult,"\n");
}
项目:SmartParking    文件:UserController.java   
/**
 * New Login get method
 * @return the user object
 */
@CrossOrigin(origins = "*")
@RequestMapping(value = "/User/LoginDemo/{key}", produces = "application/json")
@ResponseBody
public ServerUser loginDemo(@PathVariable String key) {
    if (users.get(key) != null) {
        final ParseQuery<ParseObject> query = ParseQuery.getQuery("PMUser");
        try {
            ParseObject o = query.get(users.get(key).getUserId());
            return (o == null) ? new ServerUser() : new ServerUser(new User(o));
        } catch (final Exception e) {
            return null;
        }
    }
    return new ServerUser();
}
项目:webside    文件:UserController.java   
@RequestMapping("withoutAuth/validateAccountName.html")
@ResponseBody
public Object validateAccount(String accountName){
    try
    {
        UserEntity userEntity = userService.findByName(accountName);
        if(userEntity == null)
        {
            return true;
        }else
        {
            return false;
        }
    }catch(Exception e)
    {
        throw new AjaxException(e);
    }
}
项目:aaden-pay    文件:CashController.java   
/**
 * 获取城市列表
 */
@RequestMapping(value = "/cityList", produces = "application/json;charset=UTF-8")
@ResponseBody
public JSONArray cityList(HttpServletRequest req, String areaCode) {
    // 省份列表
    List<Area> citys = bankService.getAreaLabel(areaCode);
    JSONArray array = new JSONArray();
    if (citys != null) {
        for (Area item : citys) {
            JSONObject json = new JSONObject();
            json.put("areaCode", item.getAreaCode());
            json.put("areaName", item.getAreaName());
            array.add(json);
        }
    }
    return array;
}
项目:lemon    文件:PartyStructController.java   
@RequestMapping("party-struct-list")
public String list(@ModelAttribute Page page,
        @RequestParam Map<String, Object> parameterMap, Model model) {
    String tenantId = tenantHolder.getTenantId();
    List<PropertyFilter> propertyFilters = PropertyFilter
            .buildFromMap(parameterMap);
    propertyFilters.add(new PropertyFilter("EQS_tenantId", tenantId));
    page = partyStructManager.pagedQuery(page, propertyFilters);

    List<PartyStructType> partyStructTypes = partyStructTypeManager.findBy(
            "tenantId", tenantId);
    model.addAttribute("page", page);
    model.addAttribute("partyStructTypes", partyStructTypes);

    return "party/party-struct-list";
}
项目:logistimo-web-service    文件:DomainConfigController.java   
@RequestMapping(value="general-notifications", method = RequestMethod.POST)
public
@ResponseBody
String updateGeneralNotificationsConfig(@RequestBody String language, HttpServletRequest request)
    throws ServiceException, ConfigurationException {
  SecureUserDetails sUser = getUserDetails();
  ResourceBundle backendMessages = Resources.get().getBundle("BackendMessages", sUser.getLocale());
  if(!GenericAuthoriser.authoriseAdmin(request)) {
    throw new UnauthorizedException(backendMessages.getString("permission.denied"));
  }
  Long domainId = SecurityUtils.getCurrentDomainId();
  ConfigContainer cc = getDomainConfig(domainId, sUser.getUsername(), sUser.getLocale());
  cc.dc.setLangPreference(language);
  saveDomainConfig(sUser.getLocale(), domainId, cc, backendMessages);
  xLogger.info("General notifications configuration updated successfully for domain " + domainId);
  return backendMessages.getString("general.notifications.update.success");
}
项目:wxcard    文件:UserApi.java   
@RequestMapping("/insertfaq")
private @ResponseBody Map faqWxcard(HttpServletResponse resp,HttpServletRequest req) throws Exception{
    Map map = (Map) req.getAttribute("info");
    Userinfo user = (Userinfo) req.getAttribute("user");

    String openid = (String) map.get("openid");
    String email = (String) map.get("email");
    String description = (String) map.get("description");

    if(openid == null || "".equals(openid) || "null".equals(openid) || email == null || "".equals(email) || "null".equals(email) || description == null || "".equals(description) || "null".equals(description) ){
        throw new GlobalErrorInfoException(KeyvalueErrorInfoEnum.KEYVALUE_ERROR);
    }

    map.put("userid", user.getUserid());
    try{
        userinfoService.insertFaq(map);
    }catch(Exception e){
        throw new GlobalErrorInfoException(NodescribeErrorInfoEnum.NODESCRIBE_ERROR);
    }
    map.clear();
    map.put("code", "0");
    map.put("message", "operation success");
    return map;
}
项目:shepher    文件:ReviewController.java   
/**
 * Displays a review apply.
 *
 * @param model
 * @param id
 * @return
 * @throws ShepherException
 */
@RequestMapping(value = "reviews/{id}", method = RequestMethod.GET)
public String review(Model model, @PathVariable(value = "id") long id) throws ShepherException {
    ReviewRequest reviewRequest = reviewService.get(id);
    if (reviewRequest == null) {
        throw ShepherException.createNoSuchReviewException();
    }
    reviewService.rejectIfExpired(reviewRequest);
    model.addAttribute("clusters", ClusterUtil.getClusters());
    model.addAttribute("cluster", reviewRequest.getCluster());
    model.addAttribute("paths", reviewRequest.getPath().split("/"));
    model.addAttribute("reviewRequest", reviewRequest);
    model.addAttribute("content", StringEscapeUtils.escapeHtml4(reviewRequest.getSnapshotContent()));
    model.addAttribute("newContent", StringEscapeUtils.escapeHtml4(reviewRequest.getNewSnapshotContent()));

    String backPath = reviewRequest.getPath();
    if (reviewRequest.getAction() == Action.DELETE.getValue()) {
        backPath = ParentPathParser.getParent(backPath);
    }
    model.addAttribute("backPath", backPath);
    model.addAttribute("canReview", permissionService.isPathMaster(userHolder.getUser().getName(),
            reviewRequest.getCluster(), reviewRequest.getPath()));
    return "review/review";
}
项目:zhkuas_ssm_maven    文件:UserPanelController.java   
@RequestMapping("/comment/receive")
public String showCommentsReplyMe(HttpSession session,HttpServletRequest request){
    User user = SecurityUtil.getUser(session);
    if(user==null){
        session.setAttribute("message", "你已经退出登录,请登录后重试" );
        return "error";
    }
    String currentPage =request.getParameter("currentPage");
    Pagination<PublicCourseComment> pagination = new Pagination<PublicCourseComment>();
    pagination.setPageSize(Constants.PageSize.MY_COMMENT.getSize());
    if(currentPage==null || !RegExpValidator.IsIntNumber(currentPage)){
        pagination.setCurrentPage(1);
    }else{
        pagination.setCurrentPage(Integer.valueOf(currentPage));
    }
    List<PublicCourseComment> comments = publicCourseCommentService.getPublicCourseCommentReplyByUid(user.getUid());
    pagination.setPageDataList(comments);
    request.setAttribute("pagination", pagination);
    for(PublicCourseComment comment :comments){
        if(comment.getState()==0){
            comment.setState(1);
            publicCourseCommentService.updatePublicCourseComment(comment);
        }
    }
    return "commentReplyMe";
}
项目:WiFiProbeAnalysis    文件:DataUploadController.java   
@RequestMapping(value = "/receive",method = RequestMethod.GET)
public ModelAndView receive() throws  Exception {
    System.err.println("--------------> receive <----------------");
    List<String> msg = new ArrayList<String>();
    msg = consumers.receive();
    String msg1 = consumerForHive.receive();
    ModelAndView mv = new ModelAndView();
    mv.addObject("msg",msg);
    mv.setViewName("kafka_receive");
    return  mv;
}
项目:Dude    文件:DudeController.java   
@RequestMapping(value = "/telegram", produces = MediaType.APPLICATION_JSON_VALUE)
@ResponseBody
public MessageReplyVO telegram(HttpServletRequest request) throws IOException {
    UserMessageVO userMessageVO = _encapsulateJsonRequestToObj(request, UserMessageVO.class);
    String expressTracks = expressQueryService.getExpressTracks(userMessageVO.getMessage().getText());
    MessageReplyVO messageReplyVO = new MessageReplyVO();
    messageReplyVO.setChatId(userMessageVO.getMessage().getChat().getId().toString());
    messageReplyVO.setMethod("sendMessage");
    messageReplyVO.setText(expressTracks);
    return messageReplyVO;
}
项目:lemon    文件:TaskOperationController.java   
/**
 * 取消.
 */
@RequestMapping("task-operation-cancel")
public String cancel(@RequestParam("humanTaskId") String humanTaskId,
        @RequestParam("userId") String userId,
        @RequestParam("comment") String comment) {
    humanTaskConnector.cancel(humanTaskId, userId, comment);

    return "redirect:/humantask/workspace-personalTasks.do";
}
项目:validator-web    文件:LoginController.java   
/**
 * 使用ForgotPassword组进行验证(忽略password)
 */
@Valid(value=LoginValidation.class, groups=ForgotPassword.class)
@ResponseBody
@RequestMapping("/do/forgotpassword")
public String LoginForgotPassword() {
    return "success";
}
项目:renren-msg    文件:SysLoginController.java   
@RequestMapping("captcha.jpg")
public void captcha(HttpServletResponse response) throws ServletException, IOException {
    response.setHeader("Cache-Control", "no-store, no-cache");
    response.setContentType("image/jpeg");

    // 生成文字验证码
    String text = producer.createText();
    // 生成图片验证码
    BufferedImage image = producer.createImage(text);
    // 保存到shiro session
    ShiroUtils.setSessionAttribute(Constants.KAPTCHA_SESSION_KEY, text);

    ServletOutputStream out = response.getOutputStream();
    ImageIO.write(image, "jpg", out);
}
项目:Spring-Boot-Server    文件:AppSpRestful.java   
/**
 * 陪诊列表
 * @return
 */
@RequestMapping(value = "/getAccompanyList")
@ResponseBody
public PageData getAccompanyList(@RequestBody PageData pd) throws Exception {
    if (StringUtils.isBlank(pd.getString("AI_BELONGAGENT"))) {
        return WebResult.requestFailed(10001, "参数缺失!", null);
    }
    else {
        List<PageData> list = null;
        list = appSpMapper.getAccompanyList(pd);
        return WebResult.requestSuccess(list);
    }
}
项目:logistimo-web-service    文件:ConfigController.java   
@RequestMapping(value = "/timezones/offset", method = RequestMethod.GET)
public
@ResponseBody
Map<String, String> getTimezonesWithOffset(HttpServletRequest request) {
  SecureUserDetails user = SecurityUtils.getUserDetails(request);
  return new TreeMap<>(
      LocalDateUtil.getTimeZoneNamesWithOffset(user.getLocale())); //sorted timezones
}
项目:xproject    文件:AdminController.java   
/**
 * 去首页
 * @param request
 * @param response
 * @return
 */
@RequestMapping(value={"/", "/index"}, method=GET)
public String index(HttpServletRequest request, HttpServletResponse response) {
    LoginToken<AdminUser> loginToken = (LoginToken<AdminUser>) ShiroUtils.getSessionAttribute(LoginToken.LOGIN_TOKEN_SESSION_KEY);
    logger.info(">>> 前往首页, loginUser = " + loginToken.getLoginName());
    return "index.html";
}
项目:mumu    文件:SystemMenuController.java   
/**
 * 分页获取菜单列表
 * @param parentMenuId 父菜单id
 * @param menuName 菜单名称
 * @param beginIndex 开始索引
 * @param pageSize 一页数量
 * @return
 */
@ResponseBody
@RequestMapping(value={"/page"})
public Map<String,Object> menuPage(String parentMenuId,String menuName,int beginIndex,int pageSize){
    if("0".equals(parentMenuId)){
        parentMenuId=null;
    }
    // 分页查询
    PageBean<SysMenu> pageBean = menuService.listPage(parentMenuId,menuName, beginIndex / pageSize + 1, pageSize);
    Map<String, Object> page = new HashMap<String, Object>();
    page.put("total", pageBean.getTotalCount());
    page.put("rows", pageBean.getRecordList());
    return page;
}
项目:core-data    文件:ValueDescriptorControllerImpl.java   
/**
 * Return ValueDescriptor objects with given label. ServcieException (HTTP 503) for unknown or
 * unanticipated issues.
 * 
 * @param label
 * @return list of ValueDescriptor matching UoM Label
 * @throws ServcieException (HTTP 503) for unknown or unanticipated issues
 */
@RequestMapping(value = "/label/{label:.+}", method = RequestMethod.GET)
@Override
public List<ValueDescriptor> valueDescriptorByLabel(@PathVariable String label) {
  try {
    Query query = new Query(Criteria.where("labels").all(label));
    return template.find(query, ValueDescriptor.class);
  } catch (Exception e) {
    logger.error(ERR_GETTING + e.getMessage());
    throw new ServiceException(e);
  }
}
项目:Spring-Boot-Server    文件:JybAppUserMobileMyActiveRestful.java   
@RequestMapping("/cancelThisActivity")
@ResponseBody
@Transactional      
public PageData cancelThisActivity(@RequestBody PageData pd) throws Exception{

    if(StringUtils.isBlank(pd.getString("A_ID"))
            ){
        return WebResult.requestFailed(10001, "参数缺失!", null);
    }

    jybAppUserMobileMyActiveMapper.cancelThisActivity(pd);

    return WebResult.requestSuccess();

}
项目:plumdo-work    文件:FormInstanceResource.java   
@ApiOperation(value="查询表单实例详情", notes="根据表单实例的id来获取指定对象")
   @ApiImplicitParam(name = "id", value = "表单实例ID", required = true, dataType = "Long",paramType="path")
@RequestMapping(value = "/form-instances/{id}", method = RequestMethod.GET, produces = "application/json")
@ResponseStatus(value = HttpStatus.OK)
public FormInstanceResponse getFormInstance(@PathVariable Long id) {
    FormInstance formInstance = getFormInstanceFromRequest(id);
    return responseFactory.createFormInstanceResponse(formInstance);
}
项目:DAFramework    文件:AreaController.java   
@RequestMapping(value = "/kunMingArea")
public ActionResultObj getKunMingArea() {
    ActionResultObj result = new ActionResultObj();
    try {
        WMap map = new WMap();
        map.put("data", areaDao.getAreaByParentId(1018L));
        result.setData(map);
        result.okMsg("查询成功!");
    } catch (Exception e) {
        e.printStackTrace();
        LOG.error("查询失败,原因:" + e.getMessage());
        result.error(e);
    }
    return result;
}
项目:zhkuas_ssm_maven    文件:BaseClassDataController.java   
@ResponseBody
@RequestMapping(value = "/campusAndclass/rs", method = RequestMethod.POST)
public Map<String, Object> saveCampusAreaClassRS(HttpSession session, String classNos, Integer campusId) {
    if (classNos == null || campusId == null) {
        return WebUtils.webJsonError(Error.PARAMETER_ERROR);
    }
    int count = 0;
    String[] classNoArray = classNos.split(",");
    for (String classNo : classNoArray) {
        CampusAreaClassRS campusAreaClassRS = new CampusAreaClassRS();
        campusAreaClassRS.setCampusId(campusId);
        campusAreaClassRS.setClassNo(classNo);
        CampusAreaClassRS dbItem = campusAreaClassRSService.getCampusAreaClassRSByClassNo(classNo);
        if (dbItem == null) {
            BaseClass dbClass = baseClassService.getBaseClassByClassNo(classNo);
            if (dbClass != null) {
                campusAreaClassRSService.addCampusAreaClassRS(campusAreaClassRS);
                count++;
            }
        } else {
            if (!dbItem.getCampusId().equals(campusId)) {
                dbItem.setCampusId(campusId);
                campusAreaClassRSService.updateCampusAreaClassRS(dbItem);
            }
            count++;
        }
    }
    Map<String, Object> result = new HashMap<String, Object>();
    result.put("success", count);
    result.put("fail", classNoArray.length - count);
    return WebUtils.webJsonResult(result);
}
项目:springboot-security-wechat    文件:UserController.java   
@ApiOperation(value = "重置用户密码", notes = "重置用户密码")
@RequestMapping(method = {RequestMethod.POST}, value = "/resetPassword")
@ResponseBody
public Response setPassword(@RequestParam(value = "userId") String userId,
                            HttpServletRequest request) {
    try {
        userService.resetPassword(Long.valueOf(userId));
    } catch (Exception e) {
        return errorResponse("重置失败", e.toString());
    }
    return successResponse("重置成功", null);
}
项目:solo-spring    文件:RepairProcessor.java   
/**
 * Shows remove all data page.
 *
 * @param context
 *            the specified context
 * @param request
 *            the specified HTTP servlet request
 */
@RequestMapping(value = "/rm-all-data.do", method = RequestMethod.GET)
public void removeAllDataGET(final HttpServletRequest request, final HttpServletResponse response) {
    final TextHTMLRenderer renderer = new TextHTMLRenderer();
    try {
        final StringBuilder htmlBuilder = new StringBuilder();

        htmlBuilder.append("<html><head><title>WARNING!</title>");
        htmlBuilder.append("<script type='text/javascript'");
        htmlBuilder.append("src='").append(Latkes.getStaticServer()).append("/js/lib/jquery/jquery.min.js'");
        htmlBuilder.append("></script></head><body>");
        htmlBuilder.append("<button id='ok' onclick='removeData()'>");
        htmlBuilder.append("Continue to delete ALL DATA</button></body>");
        htmlBuilder.append("<script type='text/javascript'>");
        htmlBuilder.append("function removeData() {");
        htmlBuilder.append("$.ajax({type: 'POST',url:'").append(Latkes.getContextPath())
                .append("/rm-all-data.do',");
        htmlBuilder.append("dataType: 'text/html',success: function(result){");
        htmlBuilder.append("$('html').html(result);}});}</script></html>");

        renderer.setContent(htmlBuilder.toString());
    } catch (final Exception e) {
        logger.error(e.getMessage(), e);

        try {
            response.sendError(HttpServletResponse.SC_SERVICE_UNAVAILABLE);
        } catch (final IOException ex) {
            throw new RuntimeException(ex);
        }
    }
    renderer.render(request, response);
}
项目:lemon    文件:TrainInfoController.java   
@RequestMapping("train-info-list")
public String list(@ModelAttribute Page page,
        @RequestParam Map<String, Object> parameterMap, Model model) {
    String tenantId = tenantHolder.getTenantId();
    List<PropertyFilter> propertyFilters = PropertyFilter
            .buildFromMap(parameterMap);
    propertyFilters.add(new PropertyFilter("EQS_tenantId", tenantId));
    page = trainInfoManager.pagedQuery(page, propertyFilters);

    model.addAttribute("page", page);

    return "train/train-info-list";
}
项目:mumu    文件:SystemRoleController.java   
/**
 * 添加角色
 * @return
 */
@RequiresPermissions("system:role:add")
@RequestMapping(value={"/add"},method=RequestMethod.GET)
public String roleAdd(HttpServletRequest request){
    //获取角色类型数据字典
    List<SysDDL> roleTypes = ddlService.getSystemDDLByCondition(roleType);
    request.setAttribute("roleTypes", roleTypes);
    return "system/role/add";
}
项目:wangmarket    文件:AgencyUserController.java   
/**
 * 开通我的下级代理
 * @return
 */
@RequiresPermissions("AgencyNormalAdd")
@RequestMapping("addAgency")
public String addAgency(HttpServletRequest request, Model model){
    Agency myAgency = getMyAgency();
    if(myAgency.getSiteSize() < G.agencyAddSubAgency_siteSize){
        return error(model, "您的账户余额还剩 "+myAgency.getSiteSize()+" 站币,不足以再开通下级!请联系您的上级充值");
    }

    userService.regInit(request);
    AliyunLog.addActionLog(0, "进入添加下级代理的页面");
    return "agency/addAgency";
}
项目:atsea-sample-shop-app    文件:OrderController.java   
@RequestMapping(value = "/order/", method = RequestMethod.GET)
public ResponseEntity<List<Order>> listAllOrderss() {
    List<Order> order = orderService.findAllOrders();
    if (order.isEmpty()) {
        return new ResponseEntity<List<Order>>(HttpStatus.NO_CONTENT);

    }
    return new ResponseEntity<List<Order>>(order, HttpStatus.OK);
}
项目:springboot-shiro-cas-mybatis    文件:ManageRegisteredServicesMultiActionController.java   
/**
 * Method to show the RegisteredServices.
 * @param response the response
 * @return the Model and View to go to after the services are loaded.
 */
@RequestMapping(value="manage.html", method={RequestMethod.GET})
public ModelAndView manage(final HttpServletResponse response) {
    ensureDefaultServiceExists();
    final Map<String, Object> model = new HashMap<>();
    model.put("defaultServiceUrl", this.defaultService.getId());
    model.put("status", HttpServletResponse.SC_OK);
    return new ModelAndView("manage", model);
}
项目:OperatieBRP    文件:VrijBerichtController.java   
/**
 * Haal de lijst van vrij bericht partijen behorend bij de opgegeven partij op.
 * @param id id van vrij bericht
 * @param pageable pagable instantie
 * @return pagina vrijberichtpartij pagina
 * @throws ErrorHandler.NotFoundException wanneer het item niet gevonden kan worden
 */
@RequestMapping(value = "/{id}/vrijberichtpartij", method = RequestMethod.GET)
@ResponseStatus(HttpStatus.OK)
public final Page<VrijBerichtPartij> getVrijBerichtPartijen(@PathVariable("id") final Integer id,
                                                            @PageableDefault(size = Short.MAX_VALUE) final Pageable pageable)
        throws ErrorHandler.NotFoundException {
    final List<VrijBerichtPartij> vrijBerichtPartijen = get(id).getVrijBerichtPartijen();
    return new PageImpl<>(vrijBerichtPartijen, pageable, vrijBerichtPartijen.size());
}
项目:sjk    文件:AppController.java   
/**
 * 根据id查询对应的APP
 * 
 * @param id
 * @return
 */
@Cacheable(exp = defaultCacheTime)
@RequestMapping(value = "/cdn/app/{id}.json", method = RequestMethod.GET, produces = "application/json;charset=UTF-8")
@ResponseBody
public String appForMobile(@PathVariable int id) {
    AppVo app = appService.getAppVoById(id);
    JSONObject output = new JSONObject();
    JSONObject server = new JSONObject();
    output.put("result", server);
    output.put("data", app);

    server.put("code", SvrResult.OK.getCode());
    server.put("msg", SvrResult.OK.getMsg());
    return output.toJSONString(jsonStyle);
}
项目:PowerApi    文件:BugController.java   
@RequestMapping(value = "/view", method = RequestMethod.GET)
public String view(ModelMap model,
                   @RequestParam(value = "id", required = true) Long id) {
    Bug bug = bugService.selectById(id);
    model.addAttribute("bug", bug);
    model.addAttribute("project", getProject(bug.getpId()));
    //获取评论
    List<BugComment> comments = bugCommentService.findByBugId(id);
    model.addAttribute("comments", comments);
    return "bug/view";
}