EntityNotFoundException.java (434B)
1 package com.wimdupont.swagger.blueprint.exception; 2 3 import org.springframework.http.HttpStatus; 4 import org.springframework.web.bind.annotation.ResponseStatus; 5 6 @ResponseStatus(HttpStatus.BAD_REQUEST) 7 public class EntityNotFoundException extends RuntimeException { 8 9 public <T> EntityNotFoundException(Class<T> clazz, String id) { 10 super(String.format("Entity (%s) not found for id: %s", clazz.getSimpleName(), id)); 11 } 12 }