package com.mindskip.xzs.listener; import com.mindskip.xzs.event.UserEvent; import com.mindskip.xzs.service.UserEventLogService; import lombok.AllArgsConstructor; import org.springframework.context.ApplicationListener; import org.springframework.stereotype.Component; /** * @version 2.2.0 * @description: 用户日志监听器 * Copyright (C), 2020-2021, 武汉思维跳跃科技有限公司 * @date 2021 /9/7 9:45 */ @Component @AllArgsConstructor public class UserLogListener implements ApplicationListener { private UserEventLogService userEventLogService; @Override public void onApplicationEvent(UserEvent userEvent) { userEventLogService.insertByFilter(userEvent.getUserEventLog()); } }