在 myeclipse中,使用 jdk6和7,并使用 spring-framework-5.0.2.RELEASE 时,编写代码:

 import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
public class MainApp {
public static void main(String[] args) {
ApplicationContext ac = new ClassPathXmlApplicationContext("Beans.xml");
HelloWorld obj = (HelloWorld) context.getBean("helloWorld");
obj.getMessage(); }
}

总会报错:

The type org.springframework.context.support.AbstractApplicationContext cannot be resolved. It is indirectly referenced from
required .class files

以及

Type mismatch: cannot convert from ClassPathXmlApplicationContext to ApplicationContext

原因, spring-framework-5.0.2.RELEASE  需要使用 jdk8。

The type org.springframework.context.support.AbstractApplicationContext cannot be resolved的更多相关文章

  1. The type org.springframework.dao.support.DaoSupport cannot be resolved. It is indirectly referenced

    springmvc mybatis整合,遇到错误:The type org.springframework.dao.support.DaoSupport cannot be resolved. It ...

  2. INFO main org.springframework.context.support.AbstractApplicationContext

    原因, spring-framework-5.0.2.RELEASE  需要使用 jdk8.

  3. The type org.springframework.context.ConfigurableApplicationContext cannot be resolved.

    The type org.springframework.context.ConfigurableApplicationContext cannot be resolved. eclipse导入mav ...

  4. The type org.springframework.context.ConfigurableApplicationContext cannot be resolved问题解决

    在搭建maven项目的时候,有时候会报这样的问题. The type org.springframework.context.ConfigurableApplicationContext cannot ...

  5. org.springframework.web.context.support.XmlWebApplicationContext.refresh Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreatio

    错误异常: 11-Apr-2019 18:07:14.006 警告 [RMI TCP Connection(5)-127.0.0.1] org.springframework.web.context. ...

  6. NoSuchBeanDefinitionException: No qualifying bean of type 'org.springframework.web.servlet.view.InternalResourceViewResolver' available

    问题描述: 项目中需要配置多个视图解析器,所以使用ContentNegotiatingViewResolver来处理,在其内部设置了FreeMarkerViewResolver .InternalRe ...

  7. SpringBoot- springboot集成Redis出现报错:No qualifying bean of type 'org.springframework.data.redis.connection.RedisConnectionFactory'

    Springboot将accessToke写入Redisk 缓存,springboot集成Redis出现报错 No qualifying bean of type 'org.springframewo ...

  8. Spring 定时器 No qualifying bean of type [org.springframework.scheduling.TaskScheduler] is defined(转)

    最近项目里面,用了spring的定时任务,一直以来,项目运行的不错.定时器也能正常使用.可是,今天启动项目测试的时候,盯着启动Log看了一阵子,突然间发现,启动的Log中居然有一个异常,虽然一闪而过, ...

  9. No qualifying bean of type 'org.springframework.scheduling.TaskScheduler' available

    2019-07-22 17:59:30,966 [DEBUG] [localhost-startStop-1] [ScheduledAnnotationBeanPostProcessor.java : ...

随机推荐

  1. 20145204 《Java程序设计》第6周学习总结

    20145204 <Java程序设计>第6周学习总结 教材学习内容总结 第十章 输入/输出 数据流 I/O操作主要是指使用Java进行输入,输出操作. Java所有的I/O机制都是基于数据 ...

  2. Object.getOwnPropertyNames和Object.keys

    返回对象自己(非原型继承的属性)的属性名称,包括函数. 方法: Object.getOwnPropertyNames(object); Object.keys(object); 参数: object, ...

  3. [调参]batch_size的选择

    链接:https://www.zhihu.com/question/61607442/answer/440944387 首先反对上面的尽可能调大batch size的说法,在现在较前沿的视角来看,这种 ...

  4. Gym - 101334C 3514 无向仙人掌

    http://codeforces.com/gym/101334/attachments 题意: 判断是否是仙人掌图并且连通,如果是的话则计算出它有多少个连通子图也是仙人掌. 思路:连通子图也就是我们 ...

  5. HDU 1317 XYZZY(floyd+bellman_ford判环)

    http://acm.hdu.edu.cn/showproblem.php?pid=1317 题意: 给出一个有向图,每到达一个点,都会加上或减去一些能量,我们要做的就是判断从1出发是否能到达n.初始 ...

  6. 机器学习-ID3决策树算法(附matlab/octave代码)

    ID3决策树算法是基于信息增益来构建的,信息增益可以由训练集的信息熵算得,这里举一个简单的例子 data=[心情好 天气好  出门 心情好 天气不好 出门 心情不好 天气好 出门 心情不好 天气不好 ...

  7. ThinkPHP 表单自动验证运用

    使用TP 3.2框架 public function add_post(){ //验证规则 $rule=array( array('name','require','请输入姓名',1),//必须验证n ...

  8. c++ 判断list是否为空(empty)

    #include <list> #include <iostream> using namespace std; int main() { list<int> nu ...

  9. QWebEngine_C++_交互

    参考网址:http://blog.csdn.net/liuyez123/article/details/50509788 ZC: 该文章里面的: “ <ahref="javascrip ...

  10. Java网络编程学习A轮_08_NIO的Reactor模型

    参考资料: 了解 Java NIO 的 Reactor 模型,大神 Doug Lea 的 PPT Scalable IO in Java 必看:http://gee.cs.oswego.edu/dl/ ...