配置文件设置

springmvc.xml 文件配置

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:mvc="http://www.springframework.org/schema/mvc"

xmlns:context="http://www.springframework.org/schema/context"

xsi:schemaLocation="http://www.springframework.org/schema/beans

        http://www.springframework.org/schema/beans/spring-beans.xsd

        http://www.springframework.org/schema/context

        http://www.springframework.org/schema/context/spring-context.xsd

        http://www.springframework.org/schema/mvc

        http://www.springframework.org/schema/mvc/spring-mvc.xsd">

   

    

 

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    


applicationContext.xml

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:aop="http://www.springframework.org/schema/aop"

xmlns:tx="http://www.springframework.org/schema/tx"

xmlns:context="http://www.springframework.org/schema/context"

xsi:schemaLocation="http://www.springframework.org/schema/beans

        http://www.springframework.org/schema/beans/spring-beans.xsd

        http://www.springframework.org/schema/aop

        http://www.springframework.org/schema/aop/spring-aop.xsd

        http://www.springframework.org/schema/context

        http://www.springframework.org/schema/context/spring-context.xsd

        http://www.springframework.org/schema/tx

        http://www.springframework.org/schema/tx/spring-tx.xsd" default-autowire="byName">

   

        

   

        

   

       

        

       

        

        

   

   

        

        

        

   

   

   

        

        

   

   

   

        

   

   

   

        

        

        

        

       

        

   

   

       

        

   


log4j.properties

log4j.rootCategory=DEBUG, CONSOLE ,LOGFILE

log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender

log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout

log4j.appender.CONSOLE.layout.ConversionPattern=%C %d{YYYY-MM-dd hh:mm:ss}  %m %n

log4j.appender.LOGFILE=org.apache.log4j.FileAppender

log4j.appender.LOGFILE.File=F:/my.log

log4j.appender.LOGFILE.Append=true

log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout

log4j.appender.LOGFILE.layout.ConversionPattern=%m %n


db.properties

jdbc.driver=com.mysql.jdbc.Driver

jdbc.url = jdbc:mysql://localhost:3306/ssm

jdbc.username = root

jdbc.password = root


web.xml

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_3_0.xsd">

    contextConfigLocation

    classpath:applicationContext.xml

    org.springframework.web.context.ContextLoaderListener

    springmvc

    org.springframework.web.servlet.DispatcherServlet

    

    contextConfigLocation

    classpath:springmvc.xml

    

    1

    springmvc

    /

    encoding

    org.springframework.web.filter.CharacterEncodingFilter

    

    encoding

    utf-8

    

    encoding

    /*

你可能感兴趣的:(配置文件设置)