码迷,mamicode.com
首页 >  
搜索关键字:applicationcontext    ( 2092个结果
Spring(二)
1、概述 ?2、BeanFactory ? ?3、ApplicationContext 4、Bean管理 5、创建Bean
分类:编程语言   时间:2015-06-15 11:29:02    阅读次数:159
在Servlet Filter中使用Spring容器
定义一个filter, 实现ApplicationContextAware接口:public class CacheFilter implements Filter, ApplicationContextAware { private static ApplicationContext ctx; // 必须声明为static @Override public void init...
分类:编程语言   时间:2015-06-15 00:21:50    阅读次数:147
spring的配置文件
1、applicationContext.xml ...
分类:编程语言   时间:2015-06-15 00:05:16    阅读次数:138
Invalid byte 3 of 3-byte UTF-8 sequence
用maven编译,tomcat启动时报错:IOException parsing XML document from class path resource [applicationContext.xml]; nested exception is com.sun.org.apache.xerces...
分类:其他好文   时间:2015-06-15 00:02:40    阅读次数:152
系统启动时,spring配置文件解析失败,报”cvc-elt.1: 找不到元素 'beans' 的声明“异常
现象:spring加载配置文件applicationContext.xml出错,抛出nested exception is og.xml.sax.SAXParseException; lineNumber: 12; columnNumber: 47; cvc-elt.1: 找不到元素 'beans'...
分类:编程语言   时间:2015-06-13 21:26:42    阅读次数:730
Spring面试问答Top 25
欢迎大家向我推荐你在面试过程中遇到关于Spring的问题。我会把大家推荐的问题添加到下面的Spring常用面试题清单中供大家参考。 问题清单: 什么是Spring框架?Spring框架有哪些主要模块?使用Spring框架有什么好处?什么是控制反转(IOC)?什么是依赖注入?请解释下Spring中的IOC?BeanFactory和ApplicationContext有什么区别?将Spri...
分类:编程语言   时间:2015-06-12 13:25:16    阅读次数:143
Spring在代码中获取bean的几种方式
方法一:在初始化时保存ApplicationContext对象  方法二:通过Spring提供的utils类获取ApplicationContext对象  方法三:继承自抽象类ApplicationObjectSupport  方法四:继承自抽象类WebApplicationObjectSupport  方法五:实现接口ApplicationContextAware  方法六:通过Spr...
分类:编程语言   时间:2015-06-12 11:50:36    阅读次数:137
spring中常用的注解
使用注解来构造IoC容器用注解来向Spring容器注册Bean。需要在applicationContext.xml中注册。如:在base-package指明一个包1 表明cn.gacl.java包及其子包中,如果某个类的头上带有特定的注解【@Component/@Repository/@Servic...
分类:编程语言   时间:2015-06-11 21:03:40    阅读次数:110
使用Spring容器
Spring是从一个实际开发中抽取出来的框架,因此它完成了大量开发中通用步骤,留给开发者的仅仅是与特定应用相关的部分,从而大大提高开发效率。Spring 有两个核心接口:BeanFactory和ApplicationContext,其中ApplicationContext是BeanFactor...
分类:编程语言   时间:2015-06-11 14:23:25    阅读次数:143
android ApplicationContext Context Activity 内存的一些学习
Android中context可以作很多操作,但是最主要的功能是加载和访问资源。在android中有两种context,一种是application context,一种是activity context,通常我们在各种类和方法间传递的是activity context。区别联系:public cl...
分类:移动开发   时间:2015-06-10 17:16:53    阅读次数:105
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!