当前位置: 首页 > news >正文

淄博网站排名优化商标制作logo设计

淄博网站排名优化,商标制作logo设计,杭州网站建设派迪网络,吴江和城乡建设局网站为什么80%的码农都做不了架构师#xff1f; 在软件开发的中#xff0c;如果某些特性的使用比较普遍#xff0c;那么这些特性往往可以作为平台特性来实现#xff0c;通过对这些平台特性进行有效的封装#xff0c;使其向其他应用开放。正是如此#xff0c;S… 为什么80%的码农都做不了架构师    在软件开发的中如果某些特性的使用比较普遍那么这些特性往往可以作为平台特性来实现通过对这些平台特性进行有效的封装使其向其他应用开放。正是如此Spring由于其IOC、AOP、事务处理、持久化驱动等特点使得其起到了一个应用平台的作用。Spring MVC是Spring的一个重要的模块其web应用的实现是由Spring的来支撑的Spring MVC的是实现也是依托再Spring平台提供的基础特性的。本文主要是介绍Spring mvc容器初始化的过程从中可以看出Spring MVC的对于Spring的依赖。 一、从Web应用角度看Spring MVC 在Servlet模型中请求-响应的实现依赖于两大元素的共同配合 配置Servlet及其映射关系在web.xml中在Servlet实现类中完成响应逻辑项目规模扩大之后请求-响应的映射关系全部定义在web.xml中将造成web.xml的不断膨胀而变得难以维护。针对这个问题SpringMVC提出的方案就是提炼一个核心的Servlet覆盖对所有Http请求的处理。这一被提炼出来的Servlet通常被我们称之为核心分发器。在SpringMVC中核心分发器就是org.springframework.web.servlet.DispatcherServlet。 核心分发器要解决的是下面两个问题 问题1核心Servlet应该能够建立起一整套完整的对所有Http请求进行规范化处理的流程。 问题2核心Servlet应该能够根据一定的规则对不同的Http请求分发到不同的Servlet对象上去进行处理。 针对上面的这个两个问题SpringMVC的解决方案是将整个处理流程规范化并把每一个处理步骤分派到不同的组件中进行处理。 处理流程规范化 将处理流程划分为若干个步骤任务并使用一条明确的逻辑主线将所有的步骤串联起来 处理流程组件化 将处理流程中的每一个步骤任务都定义为接口并为每个接口赋予不同的实现模式 处理流程规范化的首要内容就是考虑一个通用的Servlet响应程序大致应该包含的逻辑步骤 对Http请求进行初步处理查找与之对应的Controller处理类方法 调用相应的Controller处理类方法完成业务逻辑 对Controller处理类方法调用时可能发生的异常进行处理 根据Controller处理类方法的调用结果进行Http响应处理 所谓的组件化实际上也就是使用编程语言将这些逻辑语义表达出来。在Java语言中最适合表达逻辑处理语义的语法结构是接口而接口可以有不同的实现因此上述的四个流程也就被定义为了四个不同接口它们分别是 HandlerMapping HandlerAdapter HandlerExceptionResolver ViewResolver 二、从Spring角度看Spring MVC 从上面可以看出组件是核心分发器(DispatchServlet)的核心所在它们是http请求处理的逻辑载体DispatcherServlet是逻辑处理的调度中心组件则是被调度的操作对象。而Spring容器在这里所起到的作用是协助DispatcherServlet更好地对组件进行管理。 我们知道SpringMVC的组件是一个个的接口定义当我们在SpringMVC的核心配置文件中定义一个组件时使用的却是组件的实现类用具体的实现类来指定组件的行为模式不同的实现类代表了不同的行为模式它们在Spring中是可以共存的。Spring容器对这些实现类进行管理具体如何使用由应用程序本身来决定。 上图是Spring官方reference中的一幅图DispatchServlet对外接收http的请求而请求的处理的是依靠组件来完成的组件的接口实现的是依靠Spring IOC容器WebApplicationContext来管理。从这个图中我们可以看出Spring MVC实现web应用是依赖与Spring提供的基础特性IOC等。图中的两个WebApplicationContext的区别留到下面再讲。 三、Spring MVC 入口配置文件web.xml Spring mvc 有哪些配置文件 入口配置文件web.xml由web或应用服务器为每个web项目加载的配置文件。 应用上下文包括web框架特有配置文件SpringMVC的${dispatcherServletName}-servlet.xml配置文件。和Spring的配置文件applicationContext.xmlapplicationContext-*.xml。 遵循servlet规范Spring MVC的web应用的入口配置文件也是web.xml。web容器的初始化首先是加载web.xml文件Jetty在启动时首先加载此配置文件并且对其中定义的listener和servlet等进行相应的加载和初始化。Jetty并不清楚也不关心其他配置文件的存在因此加载其他配置文件应该是你框架的事情。那么怎么加载呢前面说过Jetty在启动时会自动加载和初始化listener和servlet那么我们可以自定义一个listenerContextLoaderListener或servletDispatcherServletJetty会根据web.xml加载和初始化他们而他们则负责加载相应的配置文件。 在web.xml配置文件中有两个主要的配置ContextLoaderListener和DispatcherServlet。同样的关于spring配置文件的相关配置也有两部分context-param和DispatcherServlet中的init-param。那么这两部分的分别表示是Spring 容器的初始化和web容器的初始化。DispatcherServlet和ContextLoaderListener提供了在Web容器中对spring的接口。ServletContext为Spring的IOC容器提供了一个宿主环境在宿主环境中Spring MVC建立起了一个IOC容器体系。 下面看一下Spring mvc 中web.xml文件的相关配置内容 push-center-server test webAppRootKey test contextConfigLocation classpath:applicationContext.xml context-paramparam-namelog4jConfigLocation/param-nameparam-valueclasspath:log4j2.xml/param-value /context-param!-- 项目使用的配置文件位置.项目启动自动读取 -- context-paramparam-namepropertiesConfigLocation/param-nameparam-value/WEB-INF/conf/config.properties/param-value /context-param!--jmonitor-- context-paramparam-namejmonitor-configfile/param-nameparam-valuejmonitor.properties/param-value /context-param listenerlistener-classcom.meituan.jmonitor.servlet.ContextListener/listener-class /listenerlistenerlistener-classorg.springframework.web.util.Log4jConfigListener/listener-class /listenerlistenerlistener-classorg.springframework.web.context.ContextLoaderListener/listener-class /listenerlistenerlistener-classorg.springframework.web.context.request.RequestContextListener/listener-class /listener!--jmonitor http collector-- filterfilter-nameJMonitorHttpMonitorFilter/filter-namefilter-classcom.meituan.jmonitor.collector.http.HttpMonitorFilter/filter-class /filter filter-mappingfilter-nameJMonitorHttpMonitorFilter/filter-nameurl-pattern/*/url-pattern /filter-mappingservletservlet-nameappServlet/servlet-nameservlet-classcom.sankuai.meituan.web.MtDispatcherServlet/servlet-classinit-paramparam-namecontextConfigLocation/param-nameparam-valueclasspath:webmvc-config.xml/param-value/init-paramload-on-startup2/load-on-startup /servletservlet-mappingservlet-nameappServlet/servlet-nameurl-pattern//url-pattern /servlet-mapping   四、Spring IOC容器(根上下文)的初始化 Spring Framework本身没有Web功能Spring MVC使用WebApplicationContext接口扩展ApplicationContext使得拥有web功能WebApplicationContext接口默认的实现是XmlWebApplicationContext。那么Spring MVC是如何在web环境中创建IoC容器呢 先看一下WebApplicationContext的源码 WebApplicationContext public interface WebApplicationContext extends ApplicationContext { //用于在ServletContext中存取根上下文 String ROOTWEBAPPLICATIONCONTEXTATTRIBUTE WebApplicationContext.class.getName() .ROOT; String SCOPE_REQUEST request;String SCOPE_SESSION session;String SCOPE_GLOBAL_SESSION globalSession;String SCOPE_APPLICATION application;String SERVLET_CONTEXT_BEAN_NAME servletContext;String CONTEXT_PARAMETERS_BEAN_NAME contextParameters;String CONTEXT_ATTRIBUTES_BEAN_NAME contextAttributes;//取得当前web容器的ServletContext ServletContext getServletContext(); } 在Spring MVC中Spring Context是以父子的继承结构存在的。Web环境ServletContext中存在一个根上下文这个Context是整个应用的根上下文是其他context的双亲Context。同时Spring MVC也对应的持有一个独立的Context它是根上下文的子上下文。 由ContextLoaderListener首先启动的上下文为根上下文该上下文是与ServletContext相伴而生的在根上下文的基础上Spring MVC对应持有的一个用来管理控制器需要的对象的子上下文。下图是ContextLoaderListener继承关系它实现了ServletContextListener接口这个接口提供了与Servlet生命周期结合的回调比如contextInitialized和contextDestroyed方法。建立WebApplicationContext的过程是在contextInitialized的接口实现中完成的具体的载入IOC容器的过程是由ContextLoader来完成的。 ContextLoaderListener public class ContextLoaderListener extends ContextLoader implements ServletContextListener { private ContextLoader contextLoader; public ContextLoaderListener() { }public ContextLoaderListener(WebApplicationContext context) {super(context); }public void contextInitialized(ServletContextEvent event) {this.contextLoader createContextLoader();if (this.contextLoader null) {this.contextLoader this;}this.contextLoader.initWebApplicationContext(event.getServletContext()); }[Deprecated](https://my.oschina.net/jianhuaw) protected ContextLoader createContextLoader() {return null; }[Deprecated](https://my.oschina.net/jianhuaw) public ContextLoader getContextLoader() {return this.contextLoader; }public void contextDestroyed(ServletContextEvent event) {if (this.contextLoader ! null) {this.contextLoader.closeWebApplicationContext(event.getServletContext());}ContextCleanupListener.cleanupAttributes(event.getServletContext()); } } 从ContextLoaderListener源码可以看出实现的是ServletContextListener接口这个接口里的函数会结合Web容器的生命周期被调用。因为ServletContextListener是ServletContext的监听者当servletContext启动或者停止的时候会触发响应的事件监听器ServletContextListener会接收到事件会做出相应的响应比如这里的contextInitialized方法和contextDestroyed方法。Spring IOC容器根上下文的生成与销毁就是通过这个两个方法的所以根上下文是与ServletContext相伴而生的。 所以当Web应用启动时contextInitialized方法会执行载入根上下文IOC容器具体过程是首先从Servlet事件中得到ServletContext然后以ServletContext为宿主环境载入根上下文IOC容器具体的载入过程是由ContextLoader处理的。 下图所示为根上下文的加载过程下面将结合源码来看一下这个过程是如何实现的。 根上下文的载入过程 ROOT Context是在ContextLoaderListener中配置的ContextLoaderListener读取context-param中的contextConfigLocation指定的配置文件创建ROOT Context。下面看一下ContextLoaderListener中创建context的源码   ContextLoader加载根上下文的源码   //这里开始对WebApplicationContext进行初始化 public WebApplicationContext initWebApplicationContext(ServletContext servletContext) {//在整个web应用中只能有一个根上下文判断ServletContext中是否已经有根上下文if (servletContext.getAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE) ! null) {throw new IllegalStateException(Cannot initialize context because there is already a root application context present - check whether you have multiple ContextLoader* definitions in your web.xml!);}Log logger LogFactory.getLog(ContextLoader.class);servletContext.log(Initializing Spring root WebApplicationContext);if (logger.isInfoEnabled()) {logger.info(Root WebApplicationContext: initialization started);}long startTime System.currentTimeMillis();try {// Store context in local instance variable, to guarantee that// it is available on ServletContext shutdown.if (this.context null) { // 执行了创建WebApplicationContext的操作this.context createWebApplicationContext(servletContext);}if (this.context instanceof ConfigurableWebApplicationContext) {ConfigurableWebApplicationContext cwac (ConfigurableWebApplicationContext) this.context;if (!cwac.isActive()) {// The context has not yet been refreshed - provide services such as// setting the parent context, setting the application context id, etcif (cwac.getParent() null) {// The context instance was injected without an explicit parent -// determine parent for root web application context, if any. //载入根上下文的双亲上下文ApplicationContext parent loadParentContext(servletContext);cwac.setParent(parent);}configureAndRefreshWebApplicationContext(cwac, servletContext);}}//将根上下文放置在servletContext中servletContext.setAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE, this.context);ClassLoader ccl Thread.currentThread().getContextClassLoader();if (ccl ContextLoader.class.getClassLoader()) {currentContext this.context;}else if (ccl ! null) {currentContextPerThread.put(ccl, this.context);}if (logger.isDebugEnabled()) {logger.debug(Published root WebApplicationContext as ServletContext attribute with name [ WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE ]);}if (logger.isInfoEnabled()) {long elapsedTime System.currentTimeMillis() - startTime;logger.info(Root WebApplicationContext: initialization completed in elapsedTime ms);}return this.context;}catch (RuntimeException ex) {logger.error(Context initialization failed, ex);servletContext.setAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE, ex);throw ex;}catch (Error err) {logger.error(Context initialization failed, err);servletContext.setAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE, err);throw err;}}protected WebApplicationContext createWebApplicationContext(ServletContext sc) { // 根据web.xml中的配置决定用那种WebApplicationContext默认用XmlWebApplicationContextClass? contextClass determineContextClass(sc); //判断contextClass是否继承ConfigurableWebApplicationContext或者是其接口实现if (!ConfigurableWebApplicationContext.class.isAssignableFrom(contextClass)) {throw new ApplicationContextException(Custom context class [ contextClass.getName() ] is not of type [ ConfigurableWebApplicationContext.class.getName() ]);} //直接实例化需要产生的IOC容器return (ConfigurableWebApplicationContext) BeanUtils.instantiateClass(contextClass);}//设置IOC容器各个参数然后通过refresh启动容器的初始化 protected void configureAndRefreshWebApplicationContext(ConfigurableWebApplicationContext wac, ServletContext sc) { //设置application context IDif (ObjectUtils.identityToString(wac).equals(wac.getId())) {// The application context id is still set to its original default value// - assign a more useful id based on available informationString idParam sc.getInitParameter(CONTEXT_ID_PARAM);if (idParam ! null) {wac.setId(idParam);}else {// Generate default id...if (sc.getMajorVersion() 2 sc.getMinorVersion() 5) {// Servlet 2.4: resort to name specified in web.xml, if any.wac.setId(ConfigurableWebApplicationContext.APPLICATION_CONTEXT_ID_PREFIX ObjectUtils.getDisplayString(sc.getServletContextName()));}else {wac.setId(ConfigurableWebApplicationContext.APPLICATION_CONTEXT_ID_PREFIX ObjectUtils.getDisplayString(sc.getContextPath()));}}} //设置ServletContextwac.setServletContext(sc); //设置配置文件的位置参数String initParameter sc.getInitParameter(CONFIG_LOCATION_PARAM);if (initParameter ! null) {wac.setConfigLocation(initParameter);} //在refresh之前根据配置的config locations重新定制CustomizeConfigurableWebApplicationContextcustomizeContext(sc, wac); //启动容器的初始化wac.refresh();}从上面的源码中可以看出来IOC容器在web容器中的启动过程与在应用中启动IOC容器的方式相似不同的是这里需要考虑web容器的环境的特点比如各种参数的设置IOC容器与web容器ServletContext的结合等。在初始化上下文以后该上下文被存储再ServletContext中这样就建立了一个全局的关于整个应用的上下文即所谓的根上下文。同时在启动Spring MVC的时候DispatchServlet在进行自己持有的上下文的初始化时是将此根上下文设置为自己的双亲上下文的。 http://blog.csdn.net/and1kaney/article/details/51214193 这篇文章可以看到根容器初始化过程的整个的call hierarchy。 五、Spring MVC容器子上下文的初始化 以上是web容器中根上下文的加载与初始化在完成对ContextLoaderListener的初始化以后web容器开始初始化DispatchServletDispatchServlet会建立自己的上下文来管理Spring MVC的bean对象。在建立这个自己持有的上下文的时候会从ServletContext中得到根上下文作为DispatchServlet持有的上下文的双亲上下文再对自己持有的上下文进行初始化最后把自己持有的这个上下文也保存到ServletContext中。 我们先看下DispatchServlet的继承关系如下图。DispatchServlet通过继承FrameworkServlet和HttpServletBean而继承了HttpServlet。HttpServletBean是Spring对于Servlet最低层次的抽象。在这一层抽象中Spring会将这个Servlet视作是一个Spring的bean并将web入口配置文件web.xml中DispatchServlet定义的init-param参数中的值作为bean的属性注入进来。 DispatcherServlet也是一个Servlet根据Servlet规范的定义Servlet中的两大核心方法init方法和service方法 init方法在整个系统启动时运行且只运行一次。因此在init方法中我们往往会对整个应用程序进行初始化操作。这些初始化操作可能包括对容器WebApplicationContext的初始化、组件和外部资源的初始化等等。 service方法在整个系统运行的过程中处于侦听模式侦听并处理所有的Web请求。因此在service及其相关方法中我们看到的则是对Http请求的处理流程。 这篇文章主要是介绍Spring mvc 容器的初始化所以主要是介绍iDisipatchServlet的init方法。 HttpServletBean Overridepublic final void init() throws ServletException {if (logger.isDebugEnabled()) {logger.debug(Initializing servlet getServletName() );}// Set bean properties from init parameters.try { //读取web.xml中DispatchServlet定义中的init-param对Bean属性进行配置PropertyValues pvs new ServletConfigPropertyValues(getServletConfig(), this.requiredProperties); //生成一个BeanWrapper将当前的这个Servlet类转化为一个BeanWrapper从而能够以Spring的方式来对init-param的值进行注入BeanWrapper bw PropertyAccessorFactory.forBeanPropertyAccess(this);ResourceLoader resourceLoader new ServletContextResourceLoader(getServletContext());bw.registerCustomEditor(Resource.class, new ResourceEditor(resourceLoader, getEnvironment()));initBeanWrapper(bw); //将init-param中的值注入bw.setPropertyValues(pvs, true);}catch (BeansException ex) {logger.error(Failed to set bean properties on servlet getServletName() , ex);throw ex;}// 调用子类的initServletBean进行具体的初始化initServletBean();if (logger.isDebugEnabled()) {logger.debug(Servlet getServletName() configured successfully);}}FrameworkServlet则是在HttpServletBean的基础之上的进一步抽象。通过FrameworkServlet真正初始化了一个Spring的容器WebApplicationContext并引入到Servlet对象之中 FrameworkServlet /*** Overridden method of {link HttpServletBean}, invoked after any bean properties* have been set. Creates this servlets WebApplicationContext.*/Overrideprotected final void initServletBean() throws ServletException {getServletContext().log(Initializing Spring FrameworkServlet getServletName() );if (this.logger.isInfoEnabled()) {this.logger.info(FrameworkServlet getServletName() : initialization started);}long startTime System.currentTimeMillis();try { //对Spring的容器webApplicationContext进行初始化this.webApplicationContext initWebApplicationContext();initFrameworkServlet();}catch (ServletException ex) {this.logger.error(Context initialization failed, ex);throw ex;}catch (RuntimeException ex) {this.logger.error(Context initialization failed, ex);throw ex;}if (this.logger.isInfoEnabled()) {long elapsedTime System.currentTimeMillis() - startTime;this.logger.info(FrameworkServlet getServletName() : initialization completed in elapsedTime ms);}}protected WebApplicationContext initWebApplicationContext() { //这里调用WebApplicationContextUtils静态类来从ServletContext中得到根上下文使用这个根上下文作为当前MVC上下文的双亲上下文。WebApplicationContext rootContext WebApplicationContextUtils.getWebApplicationContext(getServletContext());WebApplicationContext wac null;if (this.webApplicationContext ! null) {// 如果一个context的实例被注入了直接用wac this.webApplicationContext;if (wac instanceof ConfigurableWebApplicationContext) {ConfigurableWebApplicationContext cwac (ConfigurableWebApplicationContext) wac;if (!cwac.isActive()) {// 如果此上下文还没有初始化就设置上下文的参数如双亲上下文、application context id等if (cwac.getParent() null) {// 如果被注入的context实例没有双亲上下则将根上下文设置为其双亲上下文cwac.setParent(rootContext);} //设置其他参数并启动容器初始化configureAndRefreshWebApplicationContext(cwac);}}}if (wac null) {// No context instance was injected at construction time - see if one// has been registered in the servlet context. If one exists, it is assumed// that the parent context (if any) has already been set and that the// user has performed any initialization such as setting the context id //没有注入的context实例这里从ServletContext中查找是否有context实例已经注册到了servlet context了wac findWebApplicationContext();}if (wac null) {// No context instance is defined for this servlet - create a local one //在ServletContext没有context实例所以需要创建一个WebApplicationContext以根上下文为双亲下文创建wac createWebApplicationContext(rootContext);} //刷新上下文执行组件的初始化这个方法由子类DispatchServlet的方法实现if (!this.refreshEventReceived) {// Either the context is not a ConfigurableApplicationContext with refresh// support or the context injected at construction time had already been// refreshed - trigger initial onRefresh manually here.onRefresh(wac);} //把当前的上下文存到ServletContext中去使用的属性名是和当前的Servlet名相关的if (this.publishContext) {// Publish the context as a servlet context attribute.String attrName getServletContextAttributeName();getServletContext().setAttribute(attrName, wac);if (this.logger.isDebugEnabled()) {this.logger.debug(Published WebApplicationContext of servlet getServletName() as ServletContext attribute with name [ attrName ]);}}return wac;}//创建上下文 protected WebApplicationContext createWebApplicationContext(ApplicationContext parent) { // 根据web.xml中的配置决定用那种WebApplicationContext默认用XmlWebApplicationContextClass? contextClass getContextClass();if (this.logger.isDebugEnabled()) {this.logger.debug(Servlet with name getServletName() will try to create custom WebApplicationContext context of class contextClass.getName() , using parent context [ parent ]);}if (!ConfigurableWebApplicationContext.class.isAssignableFrom(contextClass)) {throw new ApplicationContextException(Fatal initialization error in servlet with name getServletName() : custom WebApplicationContext class [ contextClass.getName() ] is not of type ConfigurableWebApplicationContext);}ConfigurableWebApplicationContext wac (ConfigurableWebApplicationContext) BeanUtils.instantiateClass(contextClass); //设置上下文并启动初始化wac.setEnvironment(getEnvironment());wac.setParent(parent);wac.setConfigLocation(getContextConfigLocation());configureAndRefreshWebApplicationContext(wac);return wac;}在这个调用关系中可以看到MVC的初始化是再DispatchServlet的initStrategies方法中完成的包括对各种MVC框架的实现元素比如支持国际化的LocaleResolver、支持request映射的HandlerMappings、以及视图生成的ViewResolver等的初始化。对于具体实现元素的初始化就不一一列出源码了这里以HandlerMappings为例来说明MVC框架元素的初始化过程。 DispatchServlet   Overrideprotected void onRefresh(ApplicationContext context) {initStrategies(context);}/*** Initialize the strategy objects that this servlet uses.* pMay be overridden in subclasses in order to initialize further strategy objects.*/ 初始化默认的Spring Web MVC框架使用的策略如HandlerMappingprotected void initStrategies(ApplicationContext context) {initMultipartResolver(context);initLocaleResolver(context);initThemeResolver(context);initHandlerMappings(context);initHandlerAdapters(context);initHandlerExceptionResolvers(context);initRequestToViewNameTranslator(context);initViewResolvers(context);initFlashMapManager(context);}private void initHandlerMappings(ApplicationContext context) {this.handlerMappings null; //这里导入所有的HandlerMapping Bean这些Bean可以是在当前的DispatchServlet的IOC容器也可以是其双亲上下文中的这里detectAllHandlerMappings默认是为true的从所有的IOC容器中取if (this.detectAllHandlerMappings) {// Find all HandlerMappings in the ApplicationContext, including ancestor contexts.MapString, HandlerMapping matchingBeans BeanFactoryUtils.beansOfTypeIncludingAncestors(context, HandlerMapping.class, true, false);if (!matchingBeans.isEmpty()) {this.handlerMappings new ArrayListHandlerMapping(matchingBeans.values());// We keep HandlerMappings in sorted order.OrderComparator.sort(this.handlerMappings);}}else { //从当前IOC容器中通过getBean获取handlerMappingtry {HandlerMapping hm context.getBean(HANDLER_MAPPING_BEAN_NAME, HandlerMapping.class);this.handlerMappings Collections.singletonList(hm);}catch (NoSuchBeanDefinitionException ex) {// Ignore, well add a default HandlerMapping later.}} //如果没有找到handlerMappings设置默认的handlerMapping默认值设置在DispatcherServlet.properties中// Ensure we have at least one HandlerMapping, by registering// a default HandlerMapping if no other mappings are found.if (this.handlerMappings null) {this.handlerMappings getDefaultStrategies(context, HandlerMapping.class);if (logger.isDebugEnabled()) {logger.debug(No HandlerMappings found in servlet getServletName() : using default);}}}六、Spring MVC 上下初始化流程图 参考 http://blog.csdn.net/c289054531/article/details/9196149 http://blog.csdn.net/prince2270/article/details/5889117 http://blog.arganzheng.me/posts/config-file-in-web-application.html 转载于:https://my.oschina.net/luanwu/blog/1837479
http://www.zqtcl.cn/news/387103/

相关文章:

  • 网上做衣服的网站废旧网站哪个做的最好
  • 网站开发设置网页端口wordpress 知识库
  • 网站建设的方法有四种开发一款新闻app需要多少钱
  • 成都网站建站公司2023年防疫新政策
  • 17做网店一样的网站十大互联网培训机构
  • 中企网络科技建站施工企业oa办公系统
  • 成都网站推广公司排名淘宝商家网站建设
  • 平台网站建设报价网站建设企业蛋糕
  • 上海创意网站建设电子商务毕业设计网站建设
  • 如何让网站打不开 解析wordpress pdf检索
  • 网站建设大作业感想台州企业网站模板建站
  • 淄博网站的优化上海营销网站建站公司
  • 长春网站建设硕成传媒长春电商网站建设哪家好
  • 舟山建设管理网站手表交易网站
  • 如何电话推销客户做网站沉浸式展厅搭建商
  • 重庆网站建设开发e福州官方网站
  • 网站怎么可以被收录广州网站建设全包
  • 网站备案期间如何采购需求网站建设
  • 东莞seo网站优化运营南通网站排名外包
  • 新能源网站建设唐山专业网站建设公司
  • 石基网站建设临沂网站优化哪家好
  • 用node.js可以做网站吗上海做网站 公司有哪些
  • 淄博网站建设详细策划一个域名解析多个网站
  • 无锡网站建设首选捷搜网站优化大赛
  • 部门网站建设多少钱百度关键词挖掘查询工具
  • 做游戏直播那个网站asp做网站教程
  • 网站建设小程序开发情侣头像制作素材图片
  • spoc课程网站建设专业彩票网站建设
  • 创建网站需要注意什么忻州市城乡建设管理局网站
  • 万江做网站wordpress 动静