本文整理匯總了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";
}