Class ExceptionEvent
java.lang.Object
java.util.EventObject
org.springframework.context.ApplicationEvent
tech.riemann.nif.starter.exception.event.ExceptionEvent
- All Implemented Interfaces:
Serializable
public class ExceptionEvent
extends org.springframework.context.ApplicationEvent
异常事件类
继承自Spring的ApplicationEvent,用于在系统发生异常时传递异常信息
主要功能: 1. 封装异常对象 2. 通过Spring事件机制发布异常信息 3. 供异常事件监听器处理(如发送告警通知)
使用场景: - GlobalExceptionHandler捕获异常后发布此事件 - WechatWorkRobotExceptionEventListener监听此事件并发送企业微信通知
- Author:
- Kerbores(kerbores@riemann.tech)
- See Also:
-
Field Summary
Fields inherited from class EventObject
source -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.springframework.context.ApplicationEvent
getTimestampMethods inherited from class EventObject
getSource, toString
-
Constructor Details
-
ExceptionEvent
-
-
Method Details
-
build
构建异常事件- Parameters:
source- 异常对象- Returns:
- ExceptionEvent实例
-
getException
-