在 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. mdio rgmii mac phy简单了解

    MDIO(Management Data Input/Output),对G比特以太网而言,串行通信总线称为管理数据输入输出 (MDIO). 该总线由IEEE通过以太网标准IEEE 802.3的若干条款 ...

  2. ${user.home} is not working in jenkins windows system

    default setting create m2 in C:\Windows\system32\config\systemprofile change it to <localReposito ...

  3. JDK_源码

    1.http://hg.openjdk.java.net/ (ZC:这个貌似像官网的样子,不知道 到底是不是...) 1.1.jdk8u_jdk8u_jdk_ 5b86f66575b7 _src_.h ...

  4. Python 个人笔记(一)

    csv文件读取 使用csv标准库模块对csv文件进行读写 如下,读取名为filename的csv文件. 其中第一行为表头的列名,从第二行开始为数据内容(假设有两列). import csv with ...

  5. java中interrupt、join、sleep、notify、notifyAll、wait详解

    首先介绍一下中断概念:举个例子容易理解一点 例子:假如你正在给朋友写信,电话铃响了.这时,你放下手中的笔,去接电话.通话完毕,再继续写信.这个例子就表现了中断及其处理过程:电话铃声使你暂时中止当前的工 ...

  6. Java Spring-Bean中属性注入

    2017-11-06 20:29:13 类属性的注入的三种方法 1.接口方法注入 public interface injection{ public void setName(String name ...

  7. OKR 说明

    转载来源: http://www.jianshu.com/p/ce1141084427 一.什么是OKR? OKR的全称是“Objectives and Key Results”,翻译过来就是“目标和 ...

  8. 雷林鹏分享:Ruby 多线程

    Ruby 多线程 每个正在系统上运行的程序都是一个进程.每个进程包含一到多个线程. 线程是程序中一个单一的顺序控制流程,在单个程序中同时运行多个线程完成不同的工作,称为多线程. Ruby 中我们可以通 ...

  9. 用Python操作Named pipe命名管道,实用做法——os.read 或 os.write

    https://blog.csdn.net/mayao11/article/details/50618598

  10. torchnet package (1)

    torchnet package (1) torchnet torchnet torchnet是用于torch的代码复用和模块化编程的框架,主要包含四个类 Dataset 以不同的方式对数据进行预处理 ...