
spring
小淼同学
这个作者很懒,什么都没留下…
展开
-
Spring Bean 的 scope属性为何要设置为prototype
Spring Bean中为何有的地方要将scope属性设为prototype? 先简单说一下两个属性值: 1.Spring中Bean的配置,如果不显式指明scope的值,那么默认为单例singleton。也就是说这个Bean只会新建一个实例。 2.设置为prototype之后,就会创建多个实例,可以理解为会new很多次。而singleton只会new一个实例 准确的说,转载 2017-09-01 09:20:12 · 1853 阅读 · 0 评论 -
Spring PropertyPlaceholderConfigurer 自定义扩展
Spring中PropertyPlaceholderConfigurer这个类,它是用来解析Java Properties属性文件值,并提供在spring配置期间替换使用属性值。接下来让我们逐渐的深入其配置。 基本的使用方法是:<bean id="propertyConfigurerForAnalysis" class="org.springframework.b转载 2017-09-28 10:01:01 · 525 阅读 · 0 评论 -
spring 加载action页面
spring扫描controller,来匹配相应的servlet-mapping。。。原创 2017-11-08 22:05:36 · 457 阅读 · 0 评论 -
spring源码(BeanFactory简介)
一、BeanFactory简介BeanFactory简介IoC容器的顶级接口,是IoC容器的最基础实现,也是访问Spring容器的根接口,负责对bean的创建,访问等工作。接下来要介绍的类比较多,对于初看Spring源码的同学,只要知道BeanFactory的作用即可。蓝色的实线表示类与类之间的继承关系绿色的实线表示接口与接口之间的继承关系绿色的虚线表示类与接口之间的继承...转载 2019-10-09 10:50:54 · 156 阅读 · 0 评论