admin
2024-03-25 6729c925673fcf41cf12f6f1b59d1489a6031731
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
package com.ruoyi.framework.config;
 
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jms.core.JmsMessagingTemplate;
import org.springframework.stereotype.Component;
 
import javax.jms.*;
 
 
/**
 * Created by beyondLi on 2017/12/21.
 */
@Component
public class ActiveManager {
 
    @Autowired
    JmsMessagingTemplate jmsMessagingTemplate;
 
    /**
     * @param data
     * @desc 即时发送
     */
    public void send(Destination destination,String data) {
        this.jmsMessagingTemplate.convertAndSend(destination, data);
    }
 
}