本文整理汇总了Java中org.springframework.http.HttpStatus.MOVED_PERMANENTLY属性的典型用法代码示例。如果您正苦于以下问题:Java HttpStatus.MOVED_PERMANENTLY属性的具体用法?Java HttpStatus.MOVED_PERMANENTLY怎么用?Java HttpStatus.MOVED_PERMANENTLY使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.springframework.http.HttpStatus
的用法示例。
在下文中一共展示了HttpStatus.MOVED_PERMANENTLY属性的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: oldCategoryPost
@ResponseStatus(HttpStatus.MOVED_PERMANENTLY)
@GetMapping(value = "/{category:ruby-on-rails|nixmashup|php|best-of-everyman-links|drupal}/{postName}")
public String oldCategoryPost(HttpServletRequest request,
@PathVariable("category") String category,
@PathVariable("postName") String postName) {
request.setAttribute("category", category);
request.setAttribute("postName", postName);
throw new PostCategoryNotSupportedException();
}
示例2: validate
@RequestMapping("/validate")
@ResponseStatus(HttpStatus.MOVED_PERMANENTLY)
public ResponseEntity<?> validate(@RequestParam(value = "_username") String username) {
if (userBasicService.usernameValidate(username)) {
return ResponseEntity.status(200).body(null);
}
else return ResponseEntity.status(409).body(null);
}
示例3: validate
@RequestMapping("/inviteValidate")
@ResponseStatus(HttpStatus.MOVED_PERMANENTLY)
public ResponseEntity<?> validate(@RequestParam(value = "inviteUsername") String username) {
if (!userBasicService.usernameValidate(username)) {
return ResponseEntity.status(200).body(null);
}
else return ResponseEntity.status(406).body(null);
}
示例4: categoryPost
@ResponseStatus(HttpStatus.MOVED_PERMANENTLY)
@GetMapping(value = "/{category:java|linux|postgresql|mysql|wordpress|android|codejohnny}/{postName}")
public String categoryPost() {
return "redirect:/post/{postName}";
}
示例5: categoryPost
@ResponseStatus(HttpStatus.MOVED_PERMANENTLY)
@GetMapping(value = "/feed")
public String categoryPost() {
return "redirect:/posts/feed";
}