摘要:
如图,spring按照箭头的编号顺序处理每一个请求:1客户端发送一个请求;2DispatcherServlet通过查询handlerMapping找到对应的handler,并把处理工作委托给handler;(其实后来仔细看书才发现,返回的是HandlerExecutionChain,它包含handl...
阅读全文
摘要:
通常情况下会有这么几个配置文件:web.xml, applicationContext.xml, xxxx-servlet.xml,在web.xml中通常会这么配置DispatcherServlet:[xhtml]view plaincopymvcorg.springframework.web.se...
阅读全文
摘要:
handlerMapping的工作就是为每个请求找到合适的处理器handler.最常用的两个handlerMapping:BeanNameUrlHandlerMapping: 查找spring容器中和请求的url同名的bean.这个映射器不需要配置,因为spring在找不到handlerMappin...
阅读全文
摘要:
链接:http://downpour.iteye.com/blog/1389285
阅读全文
摘要:
一,配置分发器DispatcherServlet 是Spring MVC 的入口所有进入Spring Web 的 Request 都经过 DispatcherServlet需要在 web.xml 中注册 DispatcherServletdispatherContext org.springfram...
阅读全文
摘要:
发现spring3已经对ajax支持的很好了,前端可以只使用html+jquery,后端只使用spring再加上一种orm,两者之间用json交换数据就可以了,现在是放弃jsp,struts这些已经显得累赘的技术的时候了。出于这种想法,我做了个小试验,其中之所以选择jquery1.3.2是因为jqu...
阅读全文