Spring

     摘要: 方法一:在初始化时保存ApplicationContext对象
方法二:通过Spring提供的工具类获取ApplicationContext对象
方法三:继承自抽象类ApplicationObjectSupport
方法四:继承自抽象类WebApplicationObjectSupport
方法五:实现接口ApplicationContextAware  阅读全文

posted @ 2010-03-15 13:44 无很 阅读(10036) | 评论 (0)  编辑 |

     摘要: 请求的分发

请求首先到达DispatcherServlet,应用服务器会根据Web应用中web.xml文件定义的url映射将相应的请求分发到DispatcherServlet中


  阅读全文

posted @ 2009-08-17 14:59 无很 阅读(1285) | 评论 (0)  编辑 |

     摘要: Spring 框架简介  阅读全文

posted @ 2009-07-29 22:08 无很 阅读(197) | 评论 (0)  编辑 |

     摘要: Spring MVC 中 Controller 的层次实在是多,有些眼花缭乱了。在单个的基础上,再新加两三个叫做丰富,再多就未必是好事,反而会令人缩手新闻片脚,无从定夺。
多数 Controller 都是只完成一个任务,不过也有一个像 Struts 的 DispatchAction 的那样的 Conntroller,
org.springframework.web.servlet.mvc.multiaction.MultiActionController,意即在一个 Controller 中处理多个动作,
如同一个业务的增、删、改可以放在一起了。不至于增、删、改各自为政,造成代码混乱、重复难以维护。  阅读全文

posted @ 2009-07-29 22:04 无很 阅读(8683) | 评论 (0)  编辑 |

     摘要: 在Spring中配置log4j  阅读全文

posted @ 2009-07-29 21:51 无很 阅读(546) | 评论 (0)  编辑 |