Java for Web学习笔记(五三):Spring框架简介(2)一些准备

maven的pom.xml

我们在pom.xml中增加下面内容,本次我们给出较为完整的依赖关系,可以作为模板:



    UTF-8
    2.9.0.pr2
    2.8.1
    1.1
    3.5
    1
    1.3
    4.3.7.RELEASE




    
    
        javax.servlet  
        javax.servlet-api  
        3.1.0  
        provided  
    
    
        javax.servlet.jsp
        javax.servlet.jsp-api
        2.3.2-b02
        
    
        javax.servlet.jsp.jstl  
        javax.servlet.jsp.jstl-api  
        1.2.1  
        compile  
    

    
        org.glassfish.web  
        javax.servlet.jsp.jstl  
        1.2.2
        compile
        
            
                javax.servlet
                servlet-api
            
            
                javax.servlet.jsp
                jsp-api
            
            
                javax.servlet.jsp.jstl
                jstl-api
            
                     
    

    
        javax.el
        javax.el-api
        3.0.0
        provided
    

    
    
        javax.websocket
        javax.websocket-api
        ${websocket.version}
        provided
    

    
         org.apache.commons
         commons-lang3
         ${commons.lang3.version}
         compile
    

    
         com.fasterxml.jackson.core
         jackson-core
         ${jackson.version}
         compile
     
    
         com.fasterxml.jackson.core
         jackson-annotations
         ${jackson.version}
         compile
     
    
        com.fasterxml.jackson.core
        jackson-databind
        ${jackson.version}
        compile
     
    
        com.fasterxml.jackson.datatype
        jackson-datatype-jsr310
        ${jackson.version}
        compile
    

    
    
        org.apache.logging.log4j
        log4j-api
        ${log4j.version}
        compile
    
    
        org.apache.logging.log4j
        log4j-core
        ${log4j.version}
        compile
    
    
        org.apache.logging.log4j
        log4j-jcl
        ${log4j.version}
        runtime
    
    
        org.apache.logging.log4j
        log4j-slf4j-impl
        ${log4j.version}
        runtime
    
 
       
    
        javax.inject
        javax.inject
        ${inject.version}
        compile
    

    
        javax.annotation
        javax.annotation-api
        ${annotation-api.version}
        runtime
    

    
        org.springframework
        spring-webmvc
        ${spring.framework.version}
    

配置log4j2.xml

同样,我们希望给出一个通用的模板


    
        D:\logs
        chapter12
    
    
        
            
        
        
            
        

        
            
                %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %X{username} [%-5level] %c{1}:%L: %msg%n
            
            
                
            
            
        
        
            
                %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %X{username} [%-5level] (Spring) %c{1}: %msg%n
            
            
                
            
            
        
    
    
        
            
            
        
        
        
        
        
        
               
               
        
    

相关链接: 我的Professional Java for Web Applications相关文章

你可能感兴趣的:(JAVA,读书笔记,愷风(Wei)之Java,for,Web学习笔记)