zoukankan      html  css  js  c++  java
  • 001Spring4.2基本环境搭建

    1:工程目录以及依赖jar包如下,如果缺少某些jar包在weblogic控制台下面会有提示

    2:applicationContext.xml配置文件

    <?xml version="1.0" encoding="UTF-8"?>  
    <beans  xmlns="http://www.springframework.org/schema/beans"  
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
        xmlns:context="http://www.springframework.org/schema/context" 
        xsi:schemaLocation="http://www.springframework.org/schema/beans           
            http://www.springframework.org/schema/beans/spring-beans-3.0.xsd 
            http://www.springframework.org/schema/context             
            http://www.springframework.org/schema/context/spring-context-3.0.xsd"   
            default-lazy-init="true">  
       
        
    </beans>

    3:web.xml配置文件

    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
        <session-config>
            <session-timeout>
                30
            </session-timeout>
        </session-config>
        <welcome-file-list>
            <welcome-file>index.jsp</welcome-file>
        </welcome-file-list>
        
        <!--监听spring-->
        <listener>
            <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
        </listener>
    
        <!--过滤字符集-->
        <filter>
            <filter-name>encodingFilter</filter-name>
            <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
            <init-param>
                <param-name>encoding</param-name>
                <param-value>UTF-8</param-value>
            </init-param>
            <init-param>
                <param-name>forceEncoding</param-name>
                <param-value>true</param-value>
            </init-param>
        </filter>
        <filter-mapping>
            <filter-name>encodingFilter</filter-name>
            <url-pattern>*.do</url-pattern>
        </filter-mapping>
        
    </web-app>
  • 相关阅读:
    hdu1542线段树+离散化+扫描线
    Codeforces Round #373 (Div. 2)
    Codeforces Round #381 (Div. 2)
    Codeforces Round #352 (Div. 2)
    CodeForces
    poj3311 状压dp+floyd
    CodeForces 385 D.Bear and Floodlight 状压DP
    Codeforces Round #299 (Div. 2)D. Tavas and Malekas
    Tavas and Karafs 二分+结论
    ThikPHP3.1 常用方法(one)
  • 原文地址:https://www.cnblogs.com/yshyee/p/4774281.html
Copyright © 2011-2022 走看看