
Spring
aBOUNTWINTER
这个作者很懒,什么都没留下…
展开
-
Spring-资源
Spring’s Resource interface is meant to be a more capable interface for abstracting access to low-level resources。public interface Resource extends InputStreamSource { boolean exists();原创 2015-08-27 15:41:14 · 622 阅读 · 0 评论 -
spring-PropertyPlaceholderConfigurer和PropertyOverrideConfigurer
spring的PropertyPlaceholderConfigurer和PropertyOverrideConfigurer,类图如下:PropertyPlaceholderConfigurer和PropertyOverrideConfigurer都是spring提供的用来设置bean属性的类,从类图可以看出,这两个类都实现了BeanFactoryPostProcessor接口。转载 2015-08-29 10:30:33 · 496 阅读 · 0 评论 -
Spring-事件体系
Spring事件体系包括三个组件:事件,事件监听器,事件广播器。事件:ApplicationEvent事件监听器:ApplicationListener,对监听到的事件进行处理。事件广播器:ApplicationEventMulticaster,将Springpublish的事件广播给所有的监听器。Spring在ApplicationCo转载 2015-08-29 10:44:53 · 529 阅读 · 0 评论 -
spring-InitializingBean init-method postConstruct
相同点:InitializingBean,init-method,postConstruct三者都在bean实例化后调用。不同点:InitializingBean:The org.springframework.beans.factory.InitializingBean interface allows a bean to perform initialization原创 2015-08-31 15:31:06 · 731 阅读 · 0 评论 -
spring-扩展点-BeanPostProcessor
BeanPostProcessorThe org.springframework.beans.factory.config.BeanPostProcessor interface consists of exactly two callback methods. When such a class is registered as a post-processor with the con转载 2015-08-29 09:29:24 · 575 阅读 · 0 评论 -
spring-基于Spring可扩展Schema提供自定义配置
查看原文基于Spring可扩展Schema提供自定义配置支持(spring配置文件中 配置标签支持)在很多情况下,我们需要为系统提供可配置化支持,简单的做法可以直接基于Spring的标准Bean来配置,但配置较为复杂或者需要更多丰富控制的时候,会显得非常笨拙。一般的做法会用原生态的方式去解析定义好的xml文件,然后转化为配置对象,这种方式当然可以解决所有原创 2015-07-28 13:36:53 · 509 阅读 · 0 评论