隨筆-13  評論-9  文章-9  trackbacks-0

          DispatcherServlet
          1。初始化默認配置
          ?private static final String DEFAULT_STRATEGIES_PATH = "DispatcherServlet.properties";

          static {
          ??// Load default strategy implementations from properties file.
          ??// This is currently strictly internal and not meant to be customized
          ??// by application developers.
          ??try {
          ???ClassPathResource resource = new ClassPathResource(DEFAULT_STRATEGIES_PATH, DispatcherServlet.class);
          ???InputStream is = resource.getInputStream();
          ???try {
          ????defaultStrategies.load(is);
          ???}
          ???finally {
          ????is.close();
          ???}
          ??}
          ??catch (IOException ex) {
          ???throw new IllegalStateException("Could not load 'DispatcherServlet.properties': " + ex.getMessage());
          ??}
          ?}

          DispatcherServlet.properties 里面內容為:
          org.springframework.web.servlet.LocaleResolver=org.springframework.web.servlet.i18n.AcceptHeaderLocaleResolver

          org.springframework.web.servlet.ThemeResolver=org.springframework.web.servlet.theme.FixedThemeResolver

          org.springframework.web.servlet.HandlerMapping=org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping

          org.springframework.web.servlet.HandlerAdapter=org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter,\
          ?org.springframework.web.servlet.mvc.throwaway.ThrowawayControllerHandlerAdapter

          org.springframework.web.servlet.ViewResolver=org.springframework.web.servlet.view.InternalResourceViewResolver

          可以看出如果沒有相應的配置,DispatcherServlet就會調用默認設置

          posted on 2006-06-23 10:03 Dragonofson 閱讀(2030) 評論(0)  編輯  收藏

          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          主站蜘蛛池模板: 泗水县| 泸水县| 环江| 丰台区| 岳普湖县| 黔西县| 玛纳斯县| 虞城县| 德令哈市| 临夏县| 崇信县| 喀什市| 会理县| 彩票| 华宁县| 遂宁市| 广东省| 宜昌市| 平潭县| 玉龙| 盐亭县| 颍上县| 彭水| 大邑县| 长海县| 定日县| 新巴尔虎右旗| 逊克县| 德庆县| 澎湖县| 山东省| 仪陇县| 沙河市| 呼玛县| 沈丘县| 双峰县| 泾阳县| 高陵县| 个旧市| 广河县| 凤翔县|