加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

java – 无法解析org.springframework.context.ApplicationCont

发布时间:2020-12-15 01:42:07 所属栏目:大数据 来源:网络整理
导读:编译以下代码会产生此错误: The type org.springframework.context.ApplicationContextAware cannot be resolved. It is indirectly referenced from required .class files (this error is for last line of code) 我想我应该在构建路径中添加.jar文件,但

编译以下代码会产生此错误:

The type org.springframework.context.ApplicationContextAware cannot be resolved. It is indirectly referenced from required .class files
(this error is for last line of code)

我想我应该在构建路径中添加.jar文件,但我不知道它是什么?

CamelContext context = new DefaultCamelContext(); 
ConnectionFactory connectionFactory = new ActiveMQConnectionFactory(ActiveMQConnection.DEFAULT_BROKER_URL);
context.addComponent("test-jms",JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));
最佳答案
你需要添加Spring Framework

org.springframework.context-3.x.x.jar

到项目的构建路径.根据您使用的第三方库,它可能具有其他Spring依赖项,您也必须添加这些Spring jar.你很可能也需要org.springframework.core-3.x.x.jar.

请查阅您的直接依赖项文档,以了解它的依赖项.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读