Код: Выделить всё
@ControllerAdvice
public class AllExceptionHandler{
@ExceptionHandler(SomeCustomException.class)
@ResponseStatus(HttpStatus.BAD_REQUEST)
public void exceptionHandler() {
}
}
20.02.2019 15 :22:54,896 ПРЕДУПРЕЖДЕНИЕ [http-nio-8080-exec-1] (AbstractHandlerExceptionResolver.java:140) — решено [com.rasa.rrt.ste.controller.SomeCustomException]
Я не использую Spring Boot.
Пытался расширить указанный выше класс AllExceptionHandler с помощью ExceptionHandlerExceptionResolver и вызвать alertLogCategory(null)< /code> в конструкторе AllExceptionHandler, но он выдает NullPointerException.
Кроме того, я вижу, что в Google нужно установить это свойство Spring.mvc.log-resolved- исключение=false, чтобы отключить предупреждение, но не знаю, где и как его установить.
Подробнее здесь: https://stackoverflow.com/questions/548 ... -in-spring
Мобильная версия