SpringMVC(5.21)+Spring(5.21)+MybatisPlus+Druid+P6spy+Log4j2配置及优化

SpringMVC(5.21)+Spring(5.21)+MybatisPlus+Druid+P6spy+Log4j2配置及优化

SpringMVC-config.xml
    xmlns:mvc="http://www.springframework.org/schema/mvc"  xmlns:p="http://www.springframework.org/schema/p"
    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"
>
    
    
    
    
    
    
        
        
            
                
                    
                        application/json;charset=UTF-8
                        
                    
                
            
            
                
                    
                        text/html;charset=UTF-8
                        
                        application/json
                        
                    
                
                
                    
                        
                        WriteDateUseDateFormat
                        
                        
                        
                    
                
            
        
    
    
    
    
        
            
            
        
    
    
    
    
    
    
    
    
        
            
                
                    
                
            
        
    
    
    
    
    
        />
    
    
    
        
            
                error
                error
            
        
    
    
    
    
        
        
    
    
    
    
        
            /WEB-INF/html/
        
        
    
    
Spring>>>applicationContext.xml
    xmlns:aop="http://www.springframework.org/schema/aop"  xmlns:p="http://www.springframework.org/schema/p"
    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-2.5.xsd   
            http://www.springframework.org/schema/aop  http://www.springframework.org/schema/aop/spring-aop-2.5.xsd   
            http://www.springframework.org/schema/tx  http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
            http://www.springframework.org/schema/context
            http://www.springframework.org/schema/context/spring-context.xsd">
    
    
        
    
    
    
        
            
                oracle
                mysql
                postgresql
            
        
    
    
        
    
    
    
    
    
    
    
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
    
    
        
        
        
        
            
                
                
                
            
        
    
    
    
        
    
    
        
    
    
    
        
        
        
    
    
        
        
    
    
    
        
            
        
    
    
    
    
        
        
        
    
        
        
         
           
    
    
    
        
        
    
    
    
    
        
    
    
    
    
    
        
            
            
            
            
            
        
    
    
    
    
    
        
        
    
    
    
    
    
        
        
            
                druid-stat-interceptor
            
        
    
Mybatis-PLus.config.xml
    "http://mybatis.org/dtd/mybatis-3-config.dtd">
    
    
        
        
        
        
        
        
        
        
        
        
    
    
    
    
        
    
    
    
    
        
        
           
         
           
            
        
            
           
            
           
            
           
            
           
            
           
            
        
    
    
    
    
WEB.XML
    xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee  http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd" id="WebApp_ID"
    version="4.0"
>
    rebluid_ssm
 
    
    
    
        DruidStatView
        com.alibaba.druid.support.http.StatViewServlet
        
        
        
        
        
        
        
            
            loginUsername
            root
        
        
            
            loginPassword
            root
        
        
        
            resetEnable
            false
        
    
    
        DruidStatView
        /druid/*
    
    
        
        DruidWebStatFilter
        com.alibaba.druid.support.http.WebStatFilter
        
            
            exclusions
            *.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*
        
        
            
            sessionStatMaxCount
            1000
        
        
            
            sessionStatEnable
            true
        
        
            
            principalSessionName
            session_user_key
        
        
            
            profileEnable
            false
        
    
    
        DruidWebStatFilter
        /*
    
    
    
    
    
        springmvc
        org.springframework.web.servlet.DispatcherServlet
        
            contextConfigLocation
            classpath:springmvc-servlet.xml
        
        1
    
    
        springmvc
        /
    
    
    
        contextConfigLocation
        classpath:applicationContext-*.xml
    
    
    
        encodingFilter
        org.springframework.web.filter.CharacterEncodingFilter
        
        
        
            encoding
            UTF-8
        
        
        
            forceEncoding
            true
        
    
    
    
        encodingFilter
        /*
    
    
     
          org.apache.logging.log4j.web.Log4jServletContextListener
    
     
         log4jServletFilter
         org.apache.logging.log4j.web.Log4jServletFilter
     
     
         log4jServletFilter
         /*
         REQUEST
         FORWARD
         INCLUDE
         ERROR
     
     
    
    
    
        org.springframework.web.context.ContextLoaderListener
    
    
        index.html
        index.htm
        index.jsp
        default.html
        default.htm
        default.jsp
    
LOG4J2
    
        ubs
    
    
        spy6p" target="SYSTEM_OUT">
            
            
        
        
            
                
                
            
            
        
        
            
                
            
            
        
    
    
        
            
            
            
            
            
        
    
database.properties
postgresql.driver=org.postgresql.Driver
postgresql.url=jdbc:postgresql\://localhost\:5432/kk
postgresql.username=postgres
postgresql.password=root
#最小空闲数
minIdle=45
#允许最大空闲数  不能配置太小
maxIdle=50
#初始化时 连接个数   默认是0
initialSize=5   
#同时连接的最大活动数   默认是8
maxActive=100
#最大等待时间
maxWait=100
#超过这个时间就会将没用的连接回收秒为单位
removeAbandonedTimeout=180
#是否开启无用连接的回收机制
#【当前空闲连接数<2 && 当前活动数>最大活动数-3】这种情况下会回收
removeAbandoned=true
#dataSourceA=java:comp/env/jdbc/data
#-----------------------------------------------------
mysql8.url=jdbc:mysql://127.0.0.1:3306/customer?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=UTF-8
mysql8.username = root
mysql8.password= root
mysql8.driver= com.mysql.cj.jdbc.Driver
#最小空闲数
minIdle=45
#允许最大空闲数  不能配置太小
maxIdle=50
#初始化时 连接个数   默认是0
initialSize=5   
#同时连接的最大活动数   默认是8
maxActive=100
#最大等待时间
maxWait=100
#超过这个时间就会将没用的连接回收秒为单位
removeAbandonedTimeout=180
#是否开启无用连接的回收机制
#【当前空闲连接数<2 && 当前活动数>最大活动数-3】这种情况下会回收
removeAbandoned=true
spy.propertiles
 
modulelist=com.p6spy.engine.spy.P6SpyFactory,com.p6spy.engine.logging.P6LogFactory,com.p6spy.engine.outage.P6OutageFactory
 
driverlist=org.postgresql.Driver
 
stacktraceclass=true
 
logMessageFormat=com.p6spy.engine.spy.appender.MultiLineFormat
 
databaseDialectDateFormat=yyyy-MM-dd'T'HH:mm:ss.SSSZ
 
filter=true
 
excludecategories=info,debug,result,resultset
 
 

你可能感兴趣的:(SpringMVC(5.21)+Spring(5.21)+MybatisPlus+Druid+P6spy+Log4j2配置及优化)