【02】开发环境搭建

1、pom.xml




  4.0.0

  com.wgs.cosmos
  permission
  1.0-SNAPSHOT
  war

  permission Maven Webapp

  
      UTF-8
      5.0.7.RELEASE
      1.2.3
  

  

      
          org.springframework
          spring-beans
          ${spring.version}
      
      
          org.springframework
          spring-context
          ${spring.version}
      
      
          org.springframework
          spring-test
          ${spring.version}
      

      
      
          org.springframework
          spring-web
          ${spring.version}
      
      
          org.springframework
          spring-webmvc
          ${spring.version}
      
      
          org.springframework
          spring-jdbc
          ${spring.version}
      
      
          org.springframework
          spring-tx
          ${spring.version}
      

      
      
          mysql
          mysql-connector-java
          6.0.6
      

      
      
          org.mybatis
          mybatis
          3.4.6
      
      
          org.mybatis
          mybatis-spring
          2.0.0
      

      
      
          com.alibaba
          druid
          1.1.16
      

      
      
          org.projectlombok
          lombok
          1.18.8
      

      
      
          com.fasterxml.jackson.datatype
          jackson-datatype-guava
          2.9.8
      

      
          org.codehaus.jackson
          jackson-core-asl
          1.9.13
      
      
          org.codehaus.jackson
          jackson-mapper-asl
          1.9.13
      



      
      
          com.google.guava
          guava
          23.0
      

      
      
          org.apache.commons
          commons-lang3
          3.8.1
      

      
          junit
          junit
          4.11
          test
    

      
      
          ch.qos.logback
          logback-core
          ${logback.version}
      
      
          ch.qos.logback
          logback-classic
          ${logback.version}
      
      
          org.slf4j
          slf4j-api
          1.7.26
      



  

  
    permission
    
      
        
          maven-clean-plugin
          3.1.0
        
        
        
          maven-resources-plugin
          3.0.2
        
        
          maven-compiler-plugin
          3.8.0
        
        
          maven-surefire-plugin
          2.22.1
        
        
          maven-war-plugin
          3.2.2
        
        
          maven-install-plugin
          2.5.2
        
        
          maven-deploy-plugin
          2.8.2
        
      
    
  



2、web.xml




    Archetype Created Web Application

    
    
        org.springframework.web.context.ContextLoaderListener
    

    
    
        contextConfigLocation
        classpath*:application-context.xml
    

    
    
        dispatcherServlet
        org.springframework.web.servlet.DispatcherServlet
        
            contextConfigLocation
            classpath:springmvc-context.xml
        
        1
    
    
    
        dispatcherServlet
        /
    

    
    
        encodingFilter
        org.springframework.web.filter.CharacterEncodingFilter
        
            encoding
            UTF-8
        
        
            forceEncoding
            true
        
    
    
        encodingFilter
        /*
    

    
    
        DruidStatServlet
        com.alibaba.druid.support.http.StatViewServlet
        
            loginUsername
            druid
        
        
            loginPassword
            druid
        
    
    
        DruidStatServlet
        /sys/druid/*
    

    
        webStatFilter
        com.alibaba.druid.support.http.WebStatFilter
        
            exclusions
            *.js,*.css,*.jpg,*.png,*.ico,*.gif,/sys/druid/*
        
    
    
        webStatFilter
        *
    

    
    
        index.jsp
    



3、application-context.xml




    
    
        
        
            
                classpath:datasource.properties
            
        

    

    
    
        
        
        
        
        
        
        
        
        
    

    
    
        
        
        
    

    
        
        
    

    
    
    
    
        
        
    

    
    
        
        
        
        
    

    
        
    

4、springmvc-context.xml




    
    

    
    

    
    
    


    
    

    
    

    
    
    
    
        
        
    


5、datasource.properties

db.driverClassName=com.mysql.jdbc.Driver
db.url=jdbc:mysql://localhost:3306/CosmosPermission?useUnicode=true&characterEncoding=utf8
db.username=root
db.password=920614

db.initialSize = 3
db.maxActive = 20
db.minIdle = 3
db.maxWait = 60000
db.filters = stat,wall

6、mybatis.xml




    
        
    

    
    
    


7、logback.xml



    
        
            %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n
        
    

    
    

    
    
        
    


8、整体项目结构

image.png

你可能感兴趣的:(【02】开发环境搭建)