创建maven+springmvc+mybaite+mysql

创建maven+springmvc+mybaite+mysql_第1张图片
第1步
创建maven+springmvc+mybaite+mysql_第2张图片
第2步
创建maven+springmvc+mybaite+mysql_第3张图片
第3步
创建maven+springmvc+mybaite+mysql_第4张图片
第4步

2.配置文件
pom.xml


  4.0.0
  com.aaa
  aaa
  war
  1.0-SNAPSHOT
  aaa Maven Webapp
  http://maven.apache.org

  
    4.2.8.RELEASE
    3.2.8
    5.1.29
  

  
    
      junit
      junit
      3.8.1
      test
    

    
    
      org.springframework
      spring-webmvc
      ${spring_version}
    
    
    
      org.springframework
      spring-jdbc
      ${spring_version}
    

    
      org.aspectj
      aspectjrt
      1.8.0
    
    
      org.aspectj
      aspectjweaver
      1.8.0
    

    
    
      mysql
      mysql-connector-java
      ${mysql_version}
    

    
    
      org.mybatis
      mybatis
      ${mybatis_version}
    

    
    
      org.mybatis
      mybatis-spring
      1.3.0
    

    
    
      com.alibaba
      fastjson
      1.2.24
    

    
    
      com.alibaba
      druid
      1.0.29
    

    
    
      log4j
      log4j
      1.2.17
    

  
  
    aaa
    
      
        org.apache.maven.plugins
        maven-compiler-plugin
        
          1.6
          1.6
        
      
    
  


3.配置web.xml




  
  
    encoding
    org.springframework.web.filter.CharacterEncodingFilter
    
      encoding
      UTF-8
    
  
  
    encoding
    /*
  
  
    springmvc
    org.springframework.web.servlet.DispatcherServlet
    
      contextConfigLocation
      classpath:beans.xml
    
    1
  
  
    springmvc
    *.do
  

  
  
    DruidStatView
    com.alibaba.druid.support.http.StatViewServlet
  
  
    DruidStatView
    /druid/*
  
  

  
    index.html
  


4配置beans.xml





    
    
    
    
    
    
    
    
    
        
        
            
                
            
        

    
    
    


    

    
        
        
        
        
        
        
        
        
        
        
        
        
        
        
    


    
    
        
        
        
        
        
        
        
        
    

    
    
        
        
        
        
    


    
    
        
        
    


    
    
        
            
        
    

    
    

你可能感兴趣的:(创建maven+springmvc+mybaite+mysql)