I am rewriting some JAX-RS code as spring. However, I am not sure what to do with these exceptions.
if(file == null) {
throw new WebApplicationException(404);
}
Does spring have a similar concept? I know about ResponseEntity.status(HttpStatus.NOT_FOUND).body("Not Found");
However, it is extra work to convert everything. Currently, the endpoints just return strings, not response objects.
Thanks,