List of usage examples for org.springframework.http HttpStatus NOT_FOUND
HttpStatus NOT_FOUND
To view the source code for org.springframework.http HttpStatus NOT_FOUND.
Click Source Link
From source file:uits.school.web.controller.ExceptinHandlingController.java
@ExceptionHandler(UserNotFoundException.class) @ResponseStatus(HttpStatus.NOT_FOUND) public String userNotFoundHandler() { System.out.println("user not found"); return "error/404"; }
From source file:com.training.rest.api.MyControllerAdvice.java
@ExceptionHandler(EntityNotFoundException.class) @ResponseStatus(value = HttpStatus.NOT_FOUND) public ResponseEntity<String> handleEntityNotFoundException(EntityNotFoundException ex) { return ResponseEntity.status(HttpStatus.NOT_FOUND).contentType(MediaType.TEXT_PLAIN).body("Nope, dude!"); }
From source file:com.dhenton9000.birt.controllers.support.ExceptionControllerAdvice.java
@ExceptionHandler(ResourceNotFoundException.class) public ResponseEntity<Exception> handleNoResultException(NoResultException nre) { return new ResponseEntity<Exception>(HttpStatus.NOT_FOUND); }
From source file:org.oncoblocks.centromere.web.exceptions.DisabledEndpointException.java
public DisabledEndpointException() { super(HttpStatus.NOT_FOUND, 40402, "The requested resource is not available.", "GET requests to this URL have been disabled.", ""); }
From source file:io.ignitr.dispatchr.manager.core.error.ClientNotFoundException.java
public ClientNotFoundException(String clientId) { super(HttpStatus.NOT_FOUND, "Client, '" + clientId + "', does not exist!", ErrorCode.CLIENT_NOT_FOUND); }
From source file:com.parivero.swagger.demo.controller.ControllerExceptionHandler.java
@ExceptionHandler(NotFoundException.class) @ResponseStatus(HttpStatus.NOT_FOUND) public void runtimeExceptionHandler(NotFoundException exception) { }
From source file:org.cloudfoundry.identity.uaa.scim.exception.ScimResourceNotFoundException.java
/** * @param message a message for the caller */ public ScimResourceNotFoundException(String message) { super(message, HttpStatus.NOT_FOUND); }
From source file:org.oncoblocks.centromere.web.exceptions.ResourceNotFoundException.java
public ResourceNotFoundException() { super(HttpStatus.NOT_FOUND, 40401, "The requested resource could not be found.", "", ""); }
From source file:org.jug.bg.rest.hateoas.spring.common.resource.AbstractResource.java
/** * Handles resource not found situation. * * @param notFoundException Not found error. *//*from www . ja v a2s . c om*/ @ExceptionHandler(NotFoundException.class) @ResponseStatus(HttpStatus.NOT_FOUND) public void handleNotFoundException(NotFoundException notFoundException) { handleError(notFoundException, "Handling resource NOT FOUND error."); }
From source file:com.nebhale.devoxx2013.web.ErrorHandling.java
@ExceptionHandler(IllegalArgumentException.class) @ResponseStatus(HttpStatus.NOT_FOUND) void handleIllegalArgumentException() { }