zoukankan      html  css  js  c++  java
  • Spring MVC

    springmvc

    一:配置web.xml

     1 <!-- 配置spring -->
     2     <context-param>
     3         <param-name>contextConfigLocation</param-name>
     4         <param-value>classpath:applicationContext.xml</param-value>
     5     </context-param>
     6     <listener>
     7         <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
     8     </listener>
     9     <!-- 字符编码过滤器 -->
    10     <filter>
    11         <filter-name>encodingFilter</filter-name>
    12         <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
    13         <init-param>
    14             <param-name>encoding</param-name>
    15             <param-value>UTF-8</param-value>
    16         </init-param>
    17     </filter>
    18     <filter-mapping>
    19         <filter-name>encodingFilter</filter-name>
    20         <url-pattern>/*</url-pattern>
    21     </filter-mapping>
    22     <!-- 配置springmvc -->
    23     <servlet>
    24         <servlet-name>dispatcherServlet</servlet-name>
    25         <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
    26         <init-param>
    27             <param-name>contextConfigLocation</param-name>
    28             <param-value>classpath:springmvc.xml</param-value>
    29         </init-param>
    30         <load-on-startup>1</load-on-startup>
    31     </servlet>
    32     <servlet-mapping>
    33         <servlet-name>dispatcherServlet</servlet-name>
    34         <url-pattern>/</url-pattern>
    35     </servlet-mapping>
    View Code
  • 相关阅读:
    gulp通过http-proxy-middleware开启反向代理,实现跨域
    一些我常用的css 或者 js
    四舍五入
    生成 SSH 公钥
    对象转为数组 用lodash
    廖雪峰的官方网站
    window对象
    字符串
    简单得日期
    LeetCode 113. Path Sum II 20170705 部分之前做了没写的题目
  • 原文地址:https://www.cnblogs.com/step-and-step/p/9146781.html
Copyright © 2011-2022 走看看