一次心酸的项目整合过程

今天创建了一个项目,项目中用到了log4j,redis,shiro,spring,spring MVC,mybatis等技术,整合框架的时候,因为版本冲突浪费了很多的时间,所以今天就记录一下这个过程

  1. spring 5.x 不支持 log4j,需要使用log4j2
  2. spring 4.x 需要加入 jackson相关jar包,不然会导致各种奇奇怪怪的类加载不到,而且需要jackson的jar包版本在2.6以上,这里选择的是2.9.8,验证过,没有问题

最后带上整合的pom文件:




  4.0.0

  cn.coolserver.cooloa
  cooloa
  1.0-SNAPSHOT
  war

  cooloa Maven Webapp
  
  http://www.example.com

  
    
    4.3.19.RELEASE
    2.9.8
    
    3.2.6
    
    1.7.7
    1.2.17

    
    1.4.0
  

  
    
      junit
      junit
      4.11
      
      test
    
    
    
      org.springframework
      spring-core
      ${spring.version}
    

    
      org.springframework
      spring-web
      ${spring.version}
    
    
      org.springframework
      spring-oxm
      ${spring.version}
    
    
      org.springframework
      spring-tx
      ${spring.version}
    

    
      org.springframework
      spring-jdbc
      ${spring.version}
    

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

    
      org.springframework
      spring-context-support
      ${spring.version}
    

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

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

    
    
      org.mybatis
      mybatis
      ${mybatis.version}
    
    
    
      org.mybatis
      mybatis-spring
      1.2.2
    
    
    
      javax
      javaee-api
      7.0
    
    
    
      mysql
      mysql-connector-java
      5.1.30
    
    
    
      com.alibaba
      druid
      1.1.10
    
    
    
      jstl
      jstl
      1.2
    
    
    
    
      log4j
      log4j
      ${log4j.version}
    


    
    
      com.alibaba
      fastjson
      1.1.41
    


    
      org.slf4j
      slf4j-api
      ${slf4j.version}
    

    
      org.slf4j
      slf4j-log4j12
      ${slf4j.version}
    
    
    
    
      org.codehaus.jackson
      jackson-mapper-asl
      1.9.13
    
    
    
      commons-fileupload
      commons-fileupload
      1.3.1
    
    
      commons-io
      commons-io
      2.4
    
    
      commons-codec
      commons-codec
      1.9
    


    
    
      org.apache.shiro
      shiro-core
      ${shiro.version}
    
    
      org.apache.shiro
      shiro-spring
      ${shiro.version}
    
    
      org.apache.shiro
      shiro-web
      ${shiro.version}
    
    
      org.apache.shiro
      shiro-ehcache
      ${shiro.version}
    

    
    
    
      org.apache.commons
      commons-pool2
      2.4.2
    
    
    
    
      org.springframework.data
      spring-data-redis
      1.7.1.RELEASE
    
    
    
      redis.clients
      jedis
      2.9.1
    




  

  
    cooloa
    
      
        
          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
        
      
    
  


你可能感兴趣的:(坑,java崛起,java实战)