zhibing.pu
2024-04-12 1a334c1b3703586cd5f463960449d0283125831f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package com.stylefeng.guns.modular.listener;
 
import com.stylefeng.guns.modular.listener.event.UploadTrajectoryEvent;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.event.EventListener;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;
 
import java.io.IOException;
 
/**
 * @author xiaochen
 * @ClassName DeductPointsEventListener
 * @Description 存储定位事件异步监听器
 * @date 2024-01-15 10:44
 */
@Component
public class UploadTrajectoryEventListener {
    @Value("${filePath}")
    private String filePath;
    /**
     * 打开事件监听器的异步处理
     * @param event
     */
    @Async
    @EventListener(UploadTrajectoryEvent.class)
    public void PublishTopicVipInfoEventListener(UploadTrajectoryEvent event) throws IOException {
        // 事件处理
        String source = (String)event.getSource();
    }
 
}