2. 定义自定义事件

创建一个自定义事件类 CustomEvent,继承自 ApplicationEvent: