我在尝试使用 Spring-JMS 时遇到编译错误。快速的 Google 搜索只找到一个匹配结果,但我无法从中得到任何有用的信息。
我正在使用以下代码:
public class Class extends AbstractClass {
/** {@inheritDoc} */
@Override
public void acceptImportableItem(final ImportableItem<File> item) {
JmsOperations template = getJmsTemplate();
template.convertAndSend(item);
}
}
当我尝试编译它时,我收到以下编译错误:
cannot access javax.jms.Destination
和
class file for javax.jms.Destination not found
在我的代码中没有任何地方引用 javax.jms.Destination。你们中有人知道为什么会出现该错误吗?
最佳答案
JmsOperations 的某些方法需要 javax jms 类,因此您需要在构建路径中使用它们。无论如何,您将需要在运行时在您的类路径中使用 JMS 提供程序的实现。
关于java - 使用 Spring JMS 时编译错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5097849/