|
@ -4,18 +4,21 @@ import com.fasterxml.jackson.core.JsonProcessingException;
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
import com.fasterxml.jackson.databind.node.ObjectNode;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.jms.core.JmsMessagingTemplate;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
import javax.jms.Queue;
|
|
|
|
|
|
/**
|
|
|
* @created Airhead 2016/8/2.
|
|
|
*/
|
|
|
@Component
|
|
|
public class ServiceFlowEventService {
|
|
|
// @Autowired
|
|
|
// private JmsMessagingTemplate jmsMessagingTemplate;
|
|
|
@Autowired
|
|
|
private JmsMessagingTemplate jmsMessagingTemplate;
|
|
|
|
|
|
// @Autowired
|
|
|
// private Queue queue;
|
|
|
@Autowired
|
|
|
private Queue queue;
|
|
|
|
|
|
@Autowired
|
|
|
private ObjectMapper objectMapper;
|
|
@ -73,7 +76,7 @@ public class ServiceFlowEventService {
|
|
|
objectNode.put("path", path);
|
|
|
try {
|
|
|
String msg = objectMapper.writeValueAsString(objectNode);
|
|
|
// this.jmsMessagingTemplate.convertAndSend(this.queue, msg);
|
|
|
this.jmsMessagingTemplate.convertAndSend(this.queue, msg);
|
|
|
} catch (JsonProcessingException e) {
|
|
|
e.printStackTrace();
|
|
|
}
|