Код: Выделить всё
@ExceptionHandler(Exception.class)
@ResponseStatus(value = HttpStatus.INTERNAL_SERVER_ERROR)
public String otherExceptions(Exception e) {
return "Internal Server Error";
}
Код: Выделить всё
@ResponseStatus(value = HttpStatus.UNAUTHORIZED)
public class UserNotAuthenticatedException extends RuntimeException {
}
Подробнее здесь: https://stackoverflow.com/questions/604 ... otate-some
Мобильная версия