Merge pull request #24 from TouchInstinct/fix/handler-logger

add @EnableSpringExceptionHandlerLogger
This commit is contained in:
Alexander Buntakov 2021-06-15 20:51:43 +03:00 committed by GitHub
commit fd4c32042c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 2 deletions

View File

@ -89,11 +89,13 @@ Interceptor для логирования запросов/ответов.
## exception-handler-spring-web
Перехватывает ошибки сервера, определяет код ошибки и возвращает их в правильный `response`
Перехватывает ошибки сервера, определяет код ошибки и возвращает их в правильный `response`.
Подключается с помощью аннотации `@EnableSpringExceptionHandler`
## exception-handler-logger-spring-web
Добавляет логирование в обработку ошибок
Добавляет логирование в обработку ошибок.
Подключается с помощью аннотации `@EnableSpringExceptionHandlerLogger` до подключения основного модуля.
## version-spring-web

View File

@ -0,0 +1,8 @@
@file:Suppress("unused")
package ru.touchin.exception.handler.spring
import org.springframework.context.annotation.Import
import ru.touchin.exception.handler.spring.configurations.ExceptionHandlerLoggerConfiguration
@Import(value = [ExceptionHandlerLoggerConfiguration::class])
annotation class EnableSpringExceptionHandlerLogger