慕粉3495297
2017-12-04 21:00

报这个错不知道为什么
public class ProducerServiceImpl implements ProducerService
{ @Autowired
JmsTemplate jmsTemplate;
@Resource(name = "queueDestination")
Destination destination;
public void sendMessage(final String message) {
jmsTemplate.send(String.valueOf(destination), new MessageCreator() {
public Message createMessage(Session session) throws JMSException {
TextMessage textMessage =session.createTextMessage(message);
System.out.println("发送消息" + textMessage.getText());
return textMessage;
}
});
System.out.println("发送消息" + message);
}
}
我也报这个错
Java消息中间件
54134 学习 · 157 问题
相似问题