在 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. 关于Conversion to Dalvik format failed with error 1错误

    在用Android导入一个新项目时,不知道为啥就碰上这个错误.在网上搜了半天,发现各种办法都有,但是最后居然是:将一个项目下的文件夹libs作为了source folder,而又在Proporties ...

  2. VS+QT中文乱码问题

    1.使用QStringLiteral把所有中文包起来 2.#pragma execution_character_set("utf-8")

  3. VS+Qt使用资源

    转:https://blog.csdn.net/wxb1553725576/article/details/42042869 在vs环境下用qt进行开发时,常常需要用到各种资源,如图表.样式表等.在这 ...

  4. MySQL的yum源

    http://repo.mysql.com/ 超链接: http://repo.mysql.com/

  5. POJ 3159 Candies(差分约束+最短路)题解

    题意:给a b c要求,b拿的比a拿的多但是不超过c,问你所有人最多差多少 思路:在最短路专题应该能看出来是差分约束,条件是b - a <= c,也就是满足b <= a + c,和spfa ...

  6. hadoop经典案例

    hadoop经典案例http://blog.csdn.net/column/details/sparkhadoopdemo.html

  7. SQL server 2012 阻塞分析查询

    最近公司的数据库并发有点大,由于CPU不高.内存不高.硬盘正常.网络也正常等等,但系统还是会卡,所以就怀疑是数据库阻塞导致的,于是去查询资料,看书及经过用以下sql观查,经过几天对数据的分析找到原因并 ...

  8. 插入10W数据的两个程序比较

    程序1 添加10W数据 $count = 0; for ($i = 1;$i <= 100000 ;$i++) { $add_data = [ 'id' => $i, 'username' ...

  9. c++指向指针的指针与 c++指针作为函数参数传递问题

    一直搞不明白,c++中指针到底是个啥东西,今天遇到到c++,指向指针的指针的问题,突然有点开窍了. 举个例子: int main(int argc, char** argv){ int a[5]={1 ...

  10. BZOJ2938: [Poi2000]病毒(AC自动机)

    2938: [Poi2000]病毒 Time Limit: 1 Sec  Memory Limit: 128 MBSubmit: 1678  Solved: 849[Submit][Status][D ...