'org.springframework.beans.factory.xml.XmlBeanFactory' is deprecated
'org.springframework.beans.factory.xml.XmlBeanFactory' is deprecated
XmlBeanFactory这个类已经被摒弃了。可以用以下代替:
ApplicationContext context= new ClassPathXmlApplicationContext("applicationContext.xml");
比如:
XmlBeanFactory factory=new XmlBeanFactory(new ClassPathResource("applicationContext.xml"));
IAopService service=(IAopService) factory.getBean("aopService");
service.withAop();
factory.destroySingletons();
可以修改为:
ApplicationContext context= new ClassPathXmlApplicationContext("applicationContext.xml");
IAopService service=(IAopService) context.getBean("aopService");
service.withAop();
'org.springframework.beans.factory.xml.XmlBeanFactory' is deprecated的更多相关文章
- org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException
1.错误描述 usage: java org.apache.catalina.startup.Catalina [ -config {pathname} ] [ -nonaming ] { -help ...
- org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException Line 47 in
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 47 in XML document from ...
- org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 12 in XML document from
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 12 in XML document from ...
- spring装载配置文件失败报错:org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException
Tomcat容器启动失败,找到 debug日志一看: Context initialization failed org.springframework. beans.factory.xml.XmlB ...
- org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException 前言中不允许有内容 来自类路径资源的XML文档中的第1行是无效的
今天复习一下Spring和Hibernate的整合,遇到了一个问题,报错信息如下: org.springframework.beans.factory.xml.XmlBeanDefinitionSto ...
- 用maven工具管理web项目的错误记录:org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException
运行异常报告日志: 严重: Context initialization failedorg.springframework.beans.factory.xml.XmlBeanDefinitionSt ...
- .m2\repository\org\springframework\spring-beans\4.1.4.RELEASE\spring-beans-4.1.4.RELEASE.jar!\org\springframework\beans\factory\xml\spring-beans-4.1.xsd
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <xsd:s ...
- org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions:323) | Loading XML bean definitions from class path resource [
今天遇到一个这样的错误,这个错误是说我的spring的框架的文档没有写正确.但是反复检查,文档没有错误,原因是我使用了自己只做的user library,而且使用了 下边的System library ...
- java.lang.NoSuchMethodError: org.springframework.beans.factory.xml.XmlReaderContext.getResourceLoader()Lorg/springframework/core/io/ResourceLoader
问题原因 在整合spring跟struts2是使用Maven,用到struts2-spring-plugin.jar,但是maven不但但加载了这个jar文件还有spring-beans:3.0.5. ...
随机推荐
- bzoj1196 公路修建问题
Description OI island是一个非常漂亮的岛屿,自开发以来,到这儿来旅游的人很多.然而,由于该岛屿刚刚开发不久,所以那里的交通情况还是很糟糕.所以,OIER Association组织 ...
- 提取数据之goose使用
1.简介 Python-goose项目是用Python重写的Goose,Goose原来是用Java写的文章提取工具.Python-goose的目标是给定任意资讯文章或者任意文章类的网页,不仅提取出文章 ...
- 学习笔记之Docker
Docker 官网 http://www.docker.com Docker is the company driving the container movement and the only co ...
- Linux火焰图-centos
centos7.5mini安装 yum install -y yum-utils perf debuginfo-install -y perf #debuginfo-install下载了305MB的文 ...
- RAID5---块,条带,校验,旋转,同步/异
冗余(奇偶校验)块:RAID5中在同一个条带中用一个块来存放冗余信息,冗余信息示其他块的"异或"值,这样在同一条带中就只有(n-1)个块是实际的数据,所以RAID5中阵列容量是(n ...
- 无法打开物理文件 XXX.mdf"。操作系统错误 5:"5(拒绝访问。)"的解决办法
附加数据库时报错: 无法打开物理文件 XXX.mdf".操作系统错误 5:"5(拒绝访问.)" 原因是数据库权限无法读取路径下的文件. 解决方案 一: 数据库使用wind ...
- 8.rem适配
<!DOCTYPE html> <!--lang="en" : 英语 :声明当前页面的语言类型.--> <html lang="en&quo ...
- DistCp 集群之间数据拷贝工具
DistCp(分布式拷贝)是用于大规模集群内部和集群之间拷贝的工具.可以将数据拷贝到另个一集群,也可以将另一个集群的数据拷贝到本集群.
- 24. (ora-01410无效的rowid)临时表 on commit delete rows 与 on commit preserve rows 的区别
ora-01410无效的rowid解决方式: 把临时表空间改成会话级别的就可以了,即把临时表的创建选项由on commit delete rows改为on commit preserve rows,就 ...
- Redis 通用操作2
01, 一次设置多个键值 => mset key1 value1 key2 value2 key3 value3 ...... 02, 一次获取多个值 => mget ke1 key2 k ...