本文整理匯總了Java中org.springframework.http.HttpStatus.GONE屬性的典型用法代碼示例。如果您正苦於以下問題:Java HttpStatus.GONE屬性的具體用法?Java HttpStatus.GONE怎麽用?Java HttpStatus.GONE使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類org.springframework.http.HttpStatus
的用法示例。
在下文中一共展示了HttpStatus.GONE屬性的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: deleteServiceInstanceBinding
@RequestMapping(value = "/{instanceId}/service_bindings/{bindingId}", method = RequestMethod.DELETE)
public ResponseEntity<String> deleteServiceInstanceBinding(@PathVariable("instanceId") String instanceId,
@PathVariable("bindingId") String bindingId, @RequestParam("service_id") String serviceId,
@RequestParam("plan_id") String planId) throws ServiceBrokerException {
log.debug("DELETE: " + SERVICE_INSTANCE_BINDING_BASE_PATH + "/{bindingId}"
+ ", deleteServiceInstanceBinding(), serviceInstance.id = " + instanceId + ", bindingId = " + bindingId
+ ", serviceId = " + serviceId + ", planId = " + planId);
try {
bindingService.deleteServiceInstanceBinding(bindingId);
} catch (ServerviceInstanceBindingDoesNotExistsException e) {
return new ResponseEntity<String>("{}", HttpStatus.GONE);
}
log.debug("ServiceInstanceBinding Deleted: " + bindingId);
return new ResponseEntity<String>("{}", HttpStatus.OK);
}
示例2: delete
@RequestMapping(method = RequestMethod.DELETE)
public ResponseEntity<?> delete(@PathVariable("instance_id") String instanceId, @PathVariable("binding_id") String bindingId) {
logger.info("Entered DELETE of binding instance");
HttpStatus respCode;
if (bindingInstanceService.isExists(instanceId, bindingId)) {
bindingInstanceService.delete(bindingId);
respCode = HttpStatus.OK;
logger.trace("Deleted binding instance");
} else {
respCode = HttpStatus.GONE;
logger.warn("Binding: " + bindingId + " does not exist");
}
logger.debug("Returning: " + respCode + " (" + respCode.name() + ")");
return new ResponseEntity<>(Collections.emptyMap(), respCode);
}
示例3: delete
@RequestMapping(value = "/users", method = RequestMethod.DELETE)
public ResponseEntity<?> delete(@PathVariable("id") int id) {
userDao.delete(id);
return new ResponseEntity<>(HttpStatus.GONE);
}
示例4: delete
@RequestMapping(method = RequestMethod.DELETE)
public ResponseEntity<?> delete(@PathVariable("instance_id") String instanceId) {
logger.info("Entered DELETE service instance");
return new ResponseEntity<>(Collections.emptyMap(), (serviceInstanceService.delete(instanceId) ? HttpStatus.OK : HttpStatus.GONE));
}