![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
spring
xuelu1987
这个作者很懒,什么都没留下…
展开
-
spring容器启动方式
什么时候spring容器启动? 其实就是程序中执行加载 xml配置文件的时候 1.应用程序下加载 [code="java"]ApplicationContext ctx = new ClassPathXmlApplicationContext("testspring2.xml");[/code] 2.web模式下加载 [code="java"]web.xml: ...原创 2013-06-07 16:45:15 · 85 阅读 · 0 评论 -
Spring IOC要点
[size=medium]1、beans的scope配置默认为singleton,配置要点是:use the prototype scope for all stateful beans and the singleton scope for stateless beans. 2、与其他scope不同,spring并不会对prototype执行完整的声明周期管理,spring文档说明如下:alt...原创 2013-07-30 14:50:57 · 140 阅读 · 0 评论 -
Spring Resource要点
[size=medium]1、内置的Resource实现 There are a number of Resource implementations that come supplied straight out of the box in Spring: 1) UrlResource The UrlResource wraps a java.net.URL, and may ...原创 2013-08-07 10:42:03 · 114 阅读 · 0 评论 -
IoC容器的初始化过程
[size=medium] IoC容器的初始化时由refresh()方法来启动的,这个方法标志着IoC容器的正式启动。具体来说,这个过程包括BeanDefinition的Resource定位、载入和祖册三个基本过程。如果我们了解如何编程式地使用IoC容器,就可以清楚地看到Resource定位和载入过程的接口调用。在下面的内容里,我们将会星系分析者三个过程的实现。 Spring把这三...原创 2013-08-17 15:39:07 · 109 阅读 · 0 评论