事件实现依赖ApplicationEvent抽象类和ApplicationListener接口,applicationContext发布(publishEvent)了事件以后,ApplicationListener的onApplicationEvent监听之: Java代码如下: 01package com.uqee.spring.applicationContext;0203import org.apache.commons.logging.Log;04import org.apache.commons.logging.LogFactory;05import org.springframew Read More
posted @ 2012-11-01 11:25 attitudedecidesall Views(202) Comments(0) Diggs(0) Edit
DispathcerServler继承FrameworkServlet FrameworkServlet 继承HttpServletBean HttpServletBean 继承 HttpServlet实现EnvironmentAware接口容器启动首先执行HttpServletBean的init方法 init方法将执行FrameworkServlet的initServletBean方法FrameworkServlet的initServletBean方法将 初始化webapplicationContext this.webApplicationContext = initWebApplicat Read More
posted @ 2012-11-01 10:19 attitudedecidesall Views(1707) Comments(1) Diggs(0) Edit
DispatcherServlet是spring的web框架(以下简称SpringWeb)中的核心servlet."Spring的web框架——象其它web框架一样——是一个请求驱动的web框架,其设计围绕一个能将请求分发到控制器的servlet,它也提供其它功能帮助web应用开发。"----《Spring Framework 开发参考手册(中文版)》而在SpringWeb框架中这个servlet就是org.springframework.web.servlet.DispatcherServlet。这个Servlet的继承关系如下图所示:SpringWeb首先将传统的Htt Read More
posted @ 2012-11-01 09:26 attitudedecidesall Views(348) Comments(0) Diggs(0) Edit