
Spring
Yoara
还年轻。多学习
展开
-
在web容器中获取spring容器对象
<br />servletContext.setAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE, this.context); <br /> <br />这是生成后插入。具体代码看源码原创 2010-07-16 10:29:00 · 1110 阅读 · 0 评论 -
Spring3自定义环境配置 <beans profile="">
转自Spring 3.1的功能,以后就不用为了区分Test, Dev, Production环境,搞几个只有细微区别的application.xml, application-test.xml及引用它们的web.xml了。首先,将applicationContext.xml中的namespace从3.0升级到3.1.xsd, 然后就可以在文件末尾加入不同环境的定义,比如不同转载 2015-06-04 15:24:19 · 1269 阅读 · 0 评论 -
spring 容器初始化 bean 和销毁前所做的操作
关于在spring 容器初始化 bean 和销毁前所做的操作定义方式有三种:第一种:通过@PostConstruct 和 @PreDestroy 方法 实现初始化和销毁bean之前进行的操作第二种是:通过 在xml中定义init-method 和 destory-method方法第三种是: 通过bean实现InitializingBean和 Disposab原创 2014-11-20 11:36:04 · 1226 阅读 · 0 评论 -
Spring循环引用和AOP代理引发的两个问题
暂作记录: 1.原创 2014-10-08 14:48:38 · 3402 阅读 · 0 评论 -
Spring for Android 参考手册
1.Spring for Android(SFA) 概述1.11. Spring for Android Overview1.1 IntroductionThe Spring for Android project supports the usage of the Spring Framework in an Android environment. This inclu翻译 2014-07-20 00:04:25 · 7929 阅读 · 0 评论 -
Spring事务传播特性实例解析
原文地址:http://blog.youkuaiyun.com/liovey/article/details/14149137背景介绍 目前系统正在进行代码重构前期预研工作,目标采用spring控制事务以减少开发代码量,提高开发效率。同时避免开发人员编码控制事务所带来的链接没有释放,事务没有提交,出现异常事务没有回滚的Bug。 为保证系统能正确使用Sp转载 2013-11-14 11:57:05 · 3968 阅读 · 1 评论 -
Xfire
有了强大的Eclipse,配置xfire服务已经变得非常简单。 需要做的仅是引入包,配置xfire的配置文件。如下 service org.yoara.service org.xfire.yoara.ServiceShow web.xml里面配置 XFireServlet org.co原创 2010-05-26 10:01:00 · 621 阅读 · 0 评论 -
Spring整合hessian和burlap及自带的Invoker
Hessian和Burlap都是基于HTTP的,解决了RMI头疼的防火墙问题。并且它们都是非常轻量级的,足以在内存或空间受限制的环境下使用,例如applet和无线设备。 Hessian是基于二进制码的传输方式,Burlap是基于XML的传输方式,前者在网络传输的上具有优势,后者在没有实现Hessian(JAVA)语言或可读性上更具优势。 废话不多,最关心的是原创 2010-05-20 16:14:00 · 1870 阅读 · 0 评论 -
spring 的延迟加载
今天用spring的rmi,启动似乎不注册rmi服务。最后手工的加载bean,成了。 晕,在配置头的时候设置default-lazy-init="true",延迟加载的说。 顺便贴代码 服务器端配置文件 服务pojo随便写就成了。原创 2010-05-19 16:53:00 · 6279 阅读 · 0 评论 -
propertiesfactorybean vs propertyplaceholderconfigurer spring?
PropertiesFactoryBean is a FactoryBean implementation which reads a properties file and exposes that as an Properties object in the applicationcontext.PropertyPlaceHolderConfigurer is a BeanFactoryPost原创 2016-03-08 10:03:55 · 1633 阅读 · 0 评论