org.springframework.web.bind.annotation.RequestBody.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(6.2k)|赞(0)|评价(0)|浏览(139)

本文整理了Java中org.springframework.web.bind.annotation.RequestBody.<init>方法的一些代码示例,展示了RequestBody.<init>的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RequestBody.<init>方法的具体详情如下:
包路径:org.springframework.web.bind.annotation.RequestBody
类名称:RequestBody
方法名:<init>

RequestBody.<init>介绍

暂无

代码示例

代码示例来源:origin: macrozheng/mall

@ApiOperation("根据购物车信息生成订单")
@RequestMapping(value = "/generateOrder",method = RequestMethod.POST)
@ResponseBody
public Object generateOrder(@RequestBody OrderParam orderParam){
  return portalOrderService.generateOrder(orderParam);
}
@ApiOperation("支付成功的回调")

代码示例来源:origin: spring-projects/spring-framework

@SuppressWarnings("unused")
@ResponseBody
public String handle1(@RequestBody String s, int i) {
  return s;
}

代码示例来源:origin: ctripcorp/apollo

@PreAuthorize(value = "@permissionValidator.hasOperateNamespacePermission(#appId, #namespaceName, #env)")
@PutMapping(value = "/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules")
public void updateBranchRules(@PathVariable String appId, @PathVariable String env,
               @PathVariable String clusterName, @PathVariable String namespaceName,
               @PathVariable String branchName, @RequestBody GrayReleaseRuleDTO rules) {
 namespaceBranchService
   .updateBranchGrayRules(appId, Env.valueOf(env), clusterName, namespaceName, branchName, rules);
}

代码示例来源:origin: spring-projects/spring-framework

@RequestMapping(value = "/something", method = RequestMethod.PUT)
@ResponseBody
public String handle(@RequestBody String body) throws IOException {
  return body;
}

代码示例来源:origin: spring-projects/spring-framework

@RequestMapping(path = "/a4.css", method = RequestMethod.GET)
  public String a4(@RequestBody String body) {
    return body;
  }
}

代码示例来源:origin: spring-projects/spring-framework

@PostMapping("/requestBodyFlux")
Mono<String> requestBodyFlux(@RequestBody Flux<Part> parts) {
  return partFluxDescription(parts);
}

代码示例来源:origin: ctripcorp/apollo

@PreAcquireNamespaceLock
@PostMapping("/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/itemset")
public ResponseEntity<Void> create(@PathVariable String appId, @PathVariable String clusterName,
                  @PathVariable String namespaceName, @RequestBody ItemChangeSets changeSet) {
 itemSetService.updateSet(appId, clusterName, namespaceName, changeSet);
 return ResponseEntity.status(HttpStatus.OK).build();
}

代码示例来源:origin: sqshq/piggymetrics

@PreAuthorize("#oauth2.hasScope('server')")
  @RequestMapping(value = "/{accountName}", method = RequestMethod.PUT)
  public void saveAccountStatistics(@PathVariable String accountName, @Valid @RequestBody Account account) {
    statisticsService.save(accountName, account);
  }
}

代码示例来源:origin: macrozheng/mall

@ApiOperation("postForEntity jsonBody")
@RequestMapping(value = "/post", method = RequestMethod.POST)
@ResponseBody
public Object postForEntity(@RequestBody PmsBrand brand) {
  String url = HOST_MALL_ADMIN + "/brand/create";
  ResponseEntity<CommonResult> responseEntity = restTemplate.postForEntity(url, brand, CommonResult.class);
  return responseEntity.getBody();
}

代码示例来源:origin: spring-projects/spring-framework

@RequestMapping(value = "/something", method = RequestMethod.PATCH)
  @ResponseBody
  public String handlePartialUpdate(@RequestBody String content) throws IOException {
    return content;
  }
}

代码示例来源:origin: spring-projects/spring-framework

@RequestMapping(path = "/a1", method = RequestMethod.GET)
public String a1(@RequestBody String body) {
  return body;
}

代码示例来源:origin: spring-projects/spring-framework

@PostMapping(path = "/post", params = "p")
  void handlePost(@RequestBody Person person) {
  }
}

代码示例来源:origin: ctripcorp/apollo

@PostMapping("/apps/{appId}/initPermission")
public ResponseEntity<Void> initAppPermission(@PathVariable String appId, @RequestBody String namespaceName) {
 roleInitializationService.initNamespaceEnvRoles(appId, namespaceName, userInfoHolder.getUser().getUserId());
 return ResponseEntity.ok().build();
}

代码示例来源:origin: weibocom/motan

/**
 * 预览指令
 *
 * @param group
 * @param clientCommand
 * @param previewIP
 * @return
 */
@RequestMapping(value = "/{group}/preview", method = RequestMethod.POST)
public ResponseEntity<List<JSONObject>> previewCommand(
    @PathVariable("group") String group,
    @RequestBody ClientCommand clientCommand,
    @RequestParam(value = "previewIP", required = false) String previewIP) {
  if (StringUtils.isEmpty(group) || clientCommand == null) {
    return new ResponseEntity<List<JSONObject>>(HttpStatus.BAD_REQUEST);
  }
  List<JSONObject> results = commandService.previewCommand(group, clientCommand, previewIP);
  return new ResponseEntity<List<JSONObject>>(results, HttpStatus.OK);
}

代码示例来源:origin: ctripcorp/apollo

@PutMapping("/apps/{appId:.+}")
public void update(@PathVariable String appId, @RequestBody App app) {
 if (!Objects.equals(appId, app.getAppId())) {
  throw new BadRequestException("The App Id of path variable and request body is different");
 }
 appService.update(app);
}

代码示例来源:origin: spring-projects/spring-framework

@ResponseStatus(HttpStatus.ACCEPTED)
@ResponseBody
public String handleRequestBody(@RequestBody byte[] bytes) throws Exception {
  String requestBody = new String(bytes, "UTF-8");
  return "Handled requestBody=[" + requestBody + "]";
}

代码示例来源:origin: apache/kylin

/**
 * Build/Rebuild a cube segment
 */
@RequestMapping(value = "/{cubeName}/build", method = { RequestMethod.PUT }, produces = { "application/json" })
@ResponseBody
public JobInstance build(@PathVariable String cubeName, @RequestBody JobBuildRequest req) {
  return rebuild(cubeName, req);
}

代码示例来源:origin: spring-projects/spring-framework

@RequestMapping(value = "/something", method = RequestMethod.PUT, produces = "text/plain")
  @ResponseBody
  public String handle(@RequestBody String body) throws IOException {
    return body;
  }
}

代码示例来源:origin: spring-projects/spring-framework

@RequestMapping(path = "/a3", method = RequestMethod.GET, produces = "text/html")
public String a3(@RequestBody String body) throws IOException {
  return body;
}

代码示例来源:origin: spring-projects/spring-framework

@PostMapping("/requestBodyMap")
Mono<String> requestBodyMap(@RequestBody Mono<MultiValueMap<String, Part>> partsMono) {
  return partsMono.map(MultipartIntegrationTests::partMapDescription);
}

相关文章

微信公众号

最新文章

更多