以下代码返回Type mismatch:无法从String转换为Class
import javax.annotation.Resource;
import javax.jms.ConnectionFactory;
import javax.jms.Queue;
public class JmsMessageCollector {
@Resource(name="My_connFactory",type="javax.jms.ConnectionFactory")
private static ConnectionFactory connectionFactory;
}
我该如何解决这个问题?
答案 0 :(得分:1)
@Resource(name="WIAM_connFactory", type=javax.jms.ConnectionFactory.class)
根据错误消息和javadoc