springmvc DispatcherServlet初始化..信息..
2015-07-15 17:33
435 查看
DispatcherServlet.class protected void initStrategies(ApplicationContext context) { initMultipartResolver(context); initLocaleResolver(context); initThemeResolver(context); initHandlerMappings(context); initHandlerAdapters(context); initHandlerExceptionResolvers(context); initRequestToViewNameTranslator(context); initViewResolvers(context); initFlashMapManager(context); }
protected void onRefresh(ApplicationContext context) { initStrategies(context); }
FrameworkServlet.class public void onApplicationEvent(ContextRefreshedEvent event) { refreshEventReceived = true; onRefresh(event.getApplicationContext()); } protected void onRefresh(ApplicationContext applicationcontext) { } private class ContextRefreshListener implements ApplicationListener { public void onApplicationEvent(ContextRefreshedEvent event) { FrameworkServlet.this.onApplicationEvent(event); } public volatile void onApplicationEvent( ApplicationEvent applicationevent) { onApplicationEvent((ContextRefreshedEvent) applicationevent); } final FrameworkServlet this$0; private ContextRefreshListener() { this$0 = FrameworkServlet.this; super(); } ContextRefreshListener(ContextRefreshListener contextrefreshlistener) { this(); } }
监听初始化的时候初始化
DispatcherServlet注意 handlerMaping handlerAdapter 在上下文监听的时候 在 onRefresh方法里进行 映射数据的加载
相关文章推荐
- 堆(heap)
- Java学习------基本数据类型转换
- 001--jdk环境配置
- OpenJWeb3.1 Java Web应用快速开发平台全部开源公告
- java timer类
- eclipse 注释模板设置详解
- JAVA环境安装配置
- struts2 通配符的配置方式
- Java中的重载、重写、多态,静态绑定、动态绑定
- eclipse 添加注释简介
- java-泛型返回值的方法类型
- java Runtime.exec() 执行问题
- java web每天定时执行任务
- java 命令参数知识
- java的线程通信
- JAVA常用类总结
- 解决Struts中文乱码问题总结
- MyEclipse快捷键大全
- eclipse 设置系统变量和运行参数
- Java中Runnable和Thread的区别