The type org.springframework.context.support.AbstractApplicationContext cannot be resolved
在 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的更多相关文章
- 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 ...
- INFO main org.springframework.context.support.AbstractApplicationContext
原因, spring-framework-5.0.2.RELEASE 需要使用 jdk8.
- The type org.springframework.context.ConfigurableApplicationContext cannot be resolved.
The type org.springframework.context.ConfigurableApplicationContext cannot be resolved. eclipse导入mav ...
- The type org.springframework.context.ConfigurableApplicationContext cannot be resolved问题解决
在搭建maven项目的时候,有时候会报这样的问题. The type org.springframework.context.ConfigurableApplicationContext cannot ...
- 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. ...
- NoSuchBeanDefinitionException: No qualifying bean of type 'org.springframework.web.servlet.view.InternalResourceViewResolver' available
问题描述: 项目中需要配置多个视图解析器,所以使用ContentNegotiatingViewResolver来处理,在其内部设置了FreeMarkerViewResolver .InternalRe ...
- 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 ...
- Spring 定时器 No qualifying bean of type [org.springframework.scheduling.TaskScheduler] is defined(转)
最近项目里面,用了spring的定时任务,一直以来,项目运行的不错.定时器也能正常使用.可是,今天启动项目测试的时候,盯着启动Log看了一阵子,突然间发现,启动的Log中居然有一个异常,虽然一闪而过, ...
- No qualifying bean of type 'org.springframework.scheduling.TaskScheduler' available
2019-07-22 17:59:30,966 [DEBUG] [localhost-startStop-1] [ScheduledAnnotationBeanPostProcessor.java : ...
随机推荐
- 20145325张梓靖 《Java程序设计》第2周学习总结
20145325张梓靖 <Java程序设计>第2周学习总结 教材学习内容总结 整数 short 2字节,int 4字节,long 8字节 字节 byte 1字节 浮点数 float 4字节 ...
- HDU 3416 Marriage Match IV(ISAP+最短路)题解
题意:从A走到B,有最短路,问这样不重复的最短路有几条 思路:先来讲选有效边,我们从start和end各跑一次最短路,得到dis1和dis2数组,如果dis1[u] + dis2[v] + cost[ ...
- HDU 4272 LianLianKan (状压DP+DFS)题解
思路: 用状压DP+DFS遍历查找是否可行.假设一个数为x,那么他最远可以消去的点为x+9,因为x+1~x+4都能被他前面的点消去,所以我们将2进制的范围设为2^10,用0表示已经消去,1表示没有消去 ...
- vue-Treeselect实现组织机构(员工)下拉树的功能
知识点:前端使用vuetree的组件库,调用后台查询组织机构,包括人员的接口 实现下拉树的功能 查考: vue-treeselect官网:https://vue-treeselect.js.org/ ...
- haskell简明入门(一)
本文的主要内容参考自<Haskell趣学指南> 1. What is Haskell? 以下内容引用自Haskell官网: Haskell是一个先进的,纯粹的函数式编程语言.一个典 ...
- C#中json字符串的序列化和反序列化
改文章转自:https://www.cnblogs.com/shang201215019/p/7907655.html 什么是 Json ? Json[javascript对象表示方法] ...
- c#只读字段和常量的区别,以及静态构造函数的使用 .
using System;using System.Collections.Generic;using System.Linq;using System.Text; namespace Console ...
- java.lang.NoSuchMethodError: org.springframework.core.io.ResourceEditor
这种情况一般是jar包版本问题,pom导入的jar包存在一个2.5.6的,删掉即可.
- Java网络编程和NIO详解7:浅谈 Linux 中NIO Selector 的实现原理
Java网络编程和NIO详解7:浅谈 Linux 中NIO Selector 的实现原理 转自:https://www.jianshu.com/p/2b71ea919d49 本系列文章首发于我的个人博 ...
- StringUtils工具类的isBlank()方法使用说明