一、前言
本章主要通过开源软件组件整理分类(基础软件组件、高级软件组件等)、应用框架分类(功能框架、基础框架、技术服务组件)、常用框架版本说明、Maven依赖包等几个方面进行分享说明。
二、组件分类
1.基础软件组件
2.高级软件组件
三、应用框架
四、常用应用包版本
名称 | 版本 |
---|---|
Spring | 4.X |
Log4j2 | 2.X |
MyBatis | 3.3.0 |
Netty | 4.X |
Zookeeper | 3.4.8以上 |
Fastjson | 1.2.29 |
RocketMQ | 4.1.X |
Redis | 2.9.X |
HttpClient | 4.4.x |
Freemaker | 2.2.23 |
mongodb | 3.X |
druid | 1.0.12及以上 |
Jackson | 1.9.12 |
Tddl5 | 5.1.0 |
Jetty | 8.X |
JUnit | 4.12及以上 |
Kafka | 0.10.X及以上 |
五、maven依赖
<dependencyManagement>@b@ <dependencies>@b@ <!-- Spring -->@b@ <!-- AOP基本支持 -->@b@ <dependency>@b@ <groupId>aopalliance</groupId>@b@ <artifactId>aopalliance</artifactId>@b@ <version>1.0</version>@b@ </dependency>@b@ <!-- 动态类代理支持 -->@b@ <dependency>@b@ <groupId>cglib</groupId>@b@ <artifactId>cglib</artifactId>@b@ <version>2.2.2</version>@b@ </dependency>@b@ <dependency>@b@ <groupId>asm</groupId>@b@ <artifactId>asm</artifactId>@b@ <version>3.3.1</version>@b@ </dependency>@b@ <!-- 包含Spring框架基本的核心工具类,Spring其它组件要都要使用到这个包里的类, 是其它组件的基本核心。 -->@b@ <dependency>@b@ <groupId>org.springframework</groupId>@b@ <artifactId>spring-core</artifactId>@b@ <version>4.3.12.RELEASE</version>@b@ </dependency>@b@ <!-- 所有应用都要用到的,它包含访问配置文件、创建和管理bean 以及进行Inversion of Control / Dependency @b@ Injection(IoC/DI)操作相关的所有类。 -->@b@ <dependency>@b@ <groupId>org.springframework</groupId>@b@ <artifactId>spring-beans</artifactId>@b@ <version>4.3.12.RELEASE</version>@b@ </dependency>@b@ <!-- 包含在应用中使用Spring的AOP特性时所需的类 -->@b@ <dependency>@b@ <groupId>org.springframework</groupId>@b@ <artifactId>spring-aop</artifactId>@b@ <version>4.3.12.RELEASE</version>@b@ </dependency>@b@ <!-- 提供对AspectJ的支持,以便可以方便的将面向方面的功能集成进IDE中, 比如Eclipse AJDT。 -->@b@ <dependency>@b@ <groupId>org.springframework</groupId>@b@ <artifactId>spring-aspects</artifactId>@b@ <version>4.3.12.RELEASE</version>@b@ </dependency>@b@ <!-- 为Spring核心提供了大量扩展。可以找到使用Spring ApplicationContext 特性时所需的全部类,JDNI所需的全部类, @b@ UI方面的用来与模板(Templating)引擎如 Velocity、FreeMarker、 JasperReports集成的类,以及校验Validation方面的相关类。 -->@b@ <dependency>@b@ <groupId>org.springframework</groupId>@b@ <artifactId>spring-context</artifactId>@b@ <version>4.3.12.RELEASE</version>@b@ </dependency>@b@ <!-- 包含支持缓存Cache(ehcache)、JCA、JMX、 邮件服务(Java Mail、COS Mail)、任务计划Scheduling(Timer、Quartz)方面的类。 -->@b@ <dependency>@b@ <groupId>org.springframework</groupId>@b@ <artifactId>spring-context-support</artifactId>@b@ <version>4.3.12.RELEASE</version>@b@ </dependency>@b@ <!-- Spring表达式语言。SpringEL -->@b@ <dependency>@b@ <groupId>org.springframework</groupId>@b@ <artifactId>spring-expression</artifactId>@b@ <version>4.3.12.RELEASE</version>@b@ </dependency>@b@ <!-- 包含对Spring对JDBC数据访问进行封装的所有类。 -->@b@ <dependency>@b@ <groupId>org.springframework</groupId>@b@ <artifactId>spring-jdbc</artifactId>@b@ <version>4.3.12.RELEASE</version>@b@ </dependency>@b@ <!-- 包含Spring对DAO特性集进行了扩展,使其支持 iBATIS、JDO、OJB、TopLink, -->@b@ <dependency>@b@ <groupId>org.springframework</groupId>@b@ <artifactId>spring-orm</artifactId>@b@ <version>4.3.12.RELEASE</version>@b@ </dependency>@b@ <!-- 为JDBC、Hibernate、JDO、JPA等提供的一致的声明式和编程式事务管理。 -->@b@ <dependency>@b@ <groupId>org.springframework</groupId>@b@ <artifactId>spring-tx</artifactId>@b@ <version>4.3.12.RELEASE</version>@b@ </dependency>@b@@b@ <!-- 含Web应用开发时,用到Spring框架时所需的核心类,包括自动载入 WebApplicationContext特性的类、Struts与JSF集成类、文件上传的支持类、Filter类和大量工具辅助类。 -->@b@ <dependency>@b@ <groupId>org.springframework</groupId>@b@ <artifactId>spring-web</artifactId>@b@ <version>4.3.12.RELEASE</version>@b@ </dependency>@b@@b@ <!-- 对J2EE6.0 的Servlet3.0的支持。 -->@b@ <dependency>@b@ <groupId>org.springframework</groupId>@b@ <artifactId>spring-webmvc</artifactId>@b@ <version>4.3.12.RELEASE</version>@b@ </dependency>@b@ <!-- apache通用日志api -->@b@ <dependency>@b@ <groupId>commons-logging</groupId>@b@ <artifactId>commons-logging</artifactId>@b@ <version>1.2</version>@b@ </dependency>@b@@b@ <!-- @DatetimeFormat和@NumberFormat annotation支持 -->@b@ <dependency>@b@ <groupId>joda-time</groupId>@b@ <artifactId>joda-time</artifactId>@b@ <version>2.0</version>@b@ </dependency>@b@ <dependency>@b@ <groupId>com.alibaba</groupId>@b@ <artifactId>fastjson</artifactId>@b@ <version>1.2.29</version>@b@ </dependency>@b@@b@ <dependency>@b@ <groupId>org.apache.logging.log4j</groupId>@b@ <artifactId>log4j-api</artifactId>@b@ <version>2.3</version>@b@ </dependency>@b@@b@ <dependency>@b@ <groupId>org.apache.logging.log4j</groupId>@b@ <artifactId>log4j-core</artifactId>@b@ <version>2.3</version>@b@ </dependency>@b@@b@ <dependency>@b@ <groupId>org.apache.logging.log4j</groupId>@b@ <artifactId>log4j-1.2-api</artifactId>@b@ <version>2.3</version>@b@ </dependency>@b@@b@ <dependency>@b@ <groupId>org.apache.logging.log4j</groupId>@b@ <artifactId>log4j-slf4j-impl</artifactId>@b@ <version>2.3</version>@b@ </dependency>@b@@b@ <dependency>@b@ <groupId>org.apache.logging.log4j</groupId>@b@ <artifactId>log4j-web</artifactId>@b@ <version>2.3</version>@b@ </dependency>@b@@b@ <dependency>@b@ <groupId>org.slf4j</groupId>@b@ <artifactId>slf4j-api</artifactId>@b@ <version>1.7.21</version>@b@ </dependency>@b@ <!-- appache commons常用工具包 -->@b@ <dependency>@b@ <groupId>commons-lang</groupId>@b@ <artifactId>commons-lang</artifactId>@b@ <version>2.6</version>@b@ </dependency>@b@ <dependency>@b@ <groupId>commons-io</groupId>@b@ <artifactId>commons-io</artifactId>@b@ <version>2.2</version>@b@ </dependency>@b@ <dependency>@b@ <groupId>commons-beanutils</groupId>@b@ <artifactId>commons-beanutils</artifactId>@b@ <version>1.8.3</version>@b@ </dependency>@b@ <!-- 集合工具类 -->@b@ <dependency>@b@ <groupId>commons-collections</groupId>@b@ <artifactId>commons-collections</artifactId>@b@ <version>3.2.1</version>@b@ </dependency>@b@ <!-- 安全相关,编码与解码 -->@b@ <dependency>@b@ <groupId>commons-codec</groupId>@b@ <artifactId>commons-codec</artifactId>@b@ <version>1.9</version>@b@ </dependency>@b@ <!-- 连接池支持 -->@b@ <dependency>@b@ <groupId>org.apache.commons</groupId>@b@ <artifactId>commons-pool2</artifactId>@b@ <version>2.2</version>@b@ </dependency>@b@ <!-- xml解析支持 -->@b@ <dependency>@b@ <groupId>dom4j</groupId>@b@ <artifactId>dom4j</artifactId>@b@ <version>1.6</version>@b@ </dependency>@b@ <!-- zookeeper客户端 -->@b@ <dependency>@b@ <groupId>com.101tec</groupId>@b@ <artifactId>zkclient</artifactId>@b@ <version>0.10</version>@b@ <exclusions>@b@ <exclusion>@b@ <groupId>log4j</groupId>@b@ <artifactId>log4j</artifactId>@b@ </exclusion>@b@ <exclusion>@b@ <groupId>org.slf4j</groupId>@b@ <artifactId>slf4j-log4j12</artifactId>@b@ </exclusion>@b@ </exclusions>@b@ </dependency>@b@@b@ <dependency>@b@ <groupId>org.apache.zookeeper</groupId>@b@ <artifactId>zookeeper</artifactId>@b@ <version>3.4.8</version>@b@ <exclusions>@b@ <exclusion>@b@ <groupId>log4j</groupId>@b@ <artifactId>log4j</artifactId>@b@ </exclusion>@b@ <exclusion>@b@ <artifactId>jline</artifactId>@b@ <groupId>jline</groupId>@b@ </exclusion>@b@ <exclusion>@b@ <groupId>org.slf4j</groupId>@b@ <artifactId>slf4j-log4j12</artifactId>@b@ </exclusion>@b@ </exclusions>@b@ </dependency>@b@@b@ <!-- netty3 -->@b@ <dependency>@b@ <groupId>io.netty</groupId>@b@ <artifactId>netty</artifactId>@b@ <version>3.10.6.Final</version>@b@ </dependency>@b@@b@ <dependency>@b@ <groupId>org.javassist</groupId>@b@ <artifactId>javassist</artifactId>@b@ <version>3.16.1-GA</version>@b@ </dependency>@b@ <dependency>@b@ <groupId>com.google.guava</groupId>@b@ <artifactId>guava</artifactId>@b@ <version>18.0</version>@b@ </dependency>@b@@b@ <!-- HTTP client -->@b@ <dependency>@b@ <groupId>org.apache.httpcomponents</groupId>@b@ <artifactId>httpmime</artifactId>@b@ <version>4.4.1</version>@b@ </dependency>@b@ <dependency>@b@ <groupId>org.apache.httpcomponents</groupId>@b@ <artifactId>httpcore</artifactId>@b@ <version>4.4.1</version>@b@ </dependency>@b@ <dependency>@b@ <groupId>org.apache.httpcomponents</groupId>@b@ <artifactId>httpclient</artifactId>@b@ <version>4.4.1</version>@b@ </dependency>@b@@b@ <!-- J2EE -->@b@ <dependency>@b@ <groupId>javax.servlet.jsp</groupId>@b@ <artifactId>jsp-api</artifactId>@b@ <version>2.1</version>@b@ <scope>provided</scope>@b@ </dependency>@b@@b@ <dependency>@b@ <groupId>javax.servlet</groupId>@b@ <artifactId>servlet-api</artifactId>@b@ <version>3.0</version>@b@ <scope>provided</scope>@b@ </dependency>@b@@b@@b@ <!-- freemarker模板引擎 -->@b@ <dependency>@b@ <groupId>org.freemarker</groupId>@b@ <artifactId>freemarker</artifactId>@b@ <version>2.3.23</version>@b@ </dependency>@b@@b@ <!-- 定时任务支持:Quartz -->@b@ <dependency>@b@ <groupId>org.quartz-scheduler</groupId>@b@ <artifactId>quartz</artifactId>@b@ <version>1.8.6</version>@b@ </dependency>@b@@b@ <!-- mongodb支持 -->@b@ <dependency>@b@ <groupId>org.mongodb</groupId>@b@ <artifactId>mongo-java-driver</artifactId>@b@ <version>3.2.2</version>@b@ </dependency>@b@@b@ <dependency>@b@ <groupId>org.springframework.data</groupId>@b@ <artifactId>spring-data-commons</artifactId>@b@ <version>1.13.8.RELEASE</version>@b@ <exclusions>@b@ <exclusion>@b@ <groupId>org.slf4j</groupId>@b@ <artifactId>jcl-over-slf4j</artifactId>@b@ </exclusion>@b@ </exclusions>@b@ </dependency>@b@@b@ <dependency>@b@ <groupId>org.springframework.data</groupId>@b@ <artifactId>spring-data-mongodb</artifactId>@b@ <version>1.10.8.RELEASE</version>@b@ <exclusions>@b@ <exclusion>@b@ <groupId>org.slf4j</groupId>@b@ <artifactId>jcl-over-slf4j</artifactId>@b@ </exclusion>@b@ </exclusions>@b@ </dependency>@b@@b@ <!-- myBatis支持 -->@b@ <dependency>@b@ <groupId>org.mybatis</groupId>@b@ <artifactId>mybatis</artifactId>@b@ <version>3.3.0</version>@b@ </dependency>@b@ <dependency>@b@ <groupId>org.mybatis</groupId>@b@ <artifactId>mybatis-spring</artifactId>@b@ <version>1.2.3</version>@b@ </dependency>@b@ <!-- druid jdbc连接池 -->@b@ <dependency>@b@ <groupId>com.alibaba</groupId>@b@ <artifactId>druid</artifactId>@b@ <version>1.0.12</version>@b@ </dependency>@b@ <!-- mysql jdbc驱动 -->@b@ <dependency>@b@ <groupId>mysql</groupId>@b@ <artifactId>mysql-connector-java</artifactId>@b@ <version>5.1.30</version>@b@ </dependency>@b@ <!-- oracle jdbc驱动 -->@b@ <dependency>@b@ <groupId>com.oracle</groupId>@b@ <artifactId>ojdbc6</artifactId>@b@ <version>11.1.0.6</version>@b@ </dependency>@b@ <!-- redis客户端 -->@b@ <dependency>@b@ <groupId>redis.clients</groupId>@b@ <artifactId>jedis</artifactId>@b@ <version>2.9.0</version>@b@ </dependency>@b@@b@ <dependency>@b@ <groupId>org.apache.kafka</groupId>@b@ <artifactId>kafka-clients</artifactId>@b@ <version>0.10.0.1</version>@b@ <exclusions>@b@ <exclusion>@b@ <groupId>net.jpountz.lz4</groupId>@b@ <artifactId>lz4</artifactId>@b@ </exclusion>@b@ <exclusion>@b@ <groupId>org.xerial.snappy</groupId>@b@ <artifactId>snappy-java</artifactId>@b@ </exclusion>@b@ </exclusions>@b@ </dependency>@b@ <!-- 文件上传支持 -->@b@ <dependency>@b@ <groupId>commons-fileupload</groupId>@b@ <artifactId>commons-fileupload</artifactId>@b@ <version>1.2.2</version>@b@ </dependency>@b@ <!-- xls支持 -->@b@ <dependency>@b@ <groupId>org.apache.poi</groupId>@b@ <artifactId>poi</artifactId>@b@ <version>3.9</version>@b@ </dependency>@b@@b@@b@ <!-- RocketMQ -->@b@ <dependency>@b@ <groupId>org.apache.commons</groupId>@b@ <artifactId>commons-lang3</artifactId>@b@ <version>3.4</version>@b@ </dependency>@b@ <dependency>@b@ <groupId>org.apache.rocketmq</groupId>@b@ <artifactId>rocketmq-common</artifactId>@b@ <version>4.1.0-incubating</version>@b@ </dependency>@b@@b@ <dependency>@b@ <groupId>org.apache.rocketmq</groupId>@b@ <artifactId>rocketmq-remoting</artifactId>@b@ <version>4.1.0-incubating</version>@b@ </dependency>@b@@b@ <dependency>@b@ <groupId>org.apache.rocketmq</groupId>@b@ <artifactId>rocketmq-client</artifactId>@b@ <version>4.1.0-incubating</version>@b@ </dependency>@b@ <!-- Netty4 -->@b@ <dependency>@b@ <groupId>io.netty</groupId>@b@ <artifactId>netty-all</artifactId>@b@ <version>4.0.36.Final</version>@b@ </dependency>@b@@b@ <!-- groovy -->@b@ <dependency>@b@ <groupId>org.codehaus.groovy</groupId>@b@ <artifactId>groovy-all</artifactId>@b@ <version>2.3.9</version>@b@ <optional>true</optional>@b@ </dependency>@b@@b@ <!-- jackson -->@b@ <dependency>@b@ <groupId>org.codehaus.jackson</groupId>@b@ <artifactId>jackson-core-lgpl</artifactId>@b@ <version>1.9.12</version>@b@ <optional>true</optional>@b@ </dependency>@b@ <dependency>@b@ <groupId>org.codehaus.jackson</groupId>@b@ <artifactId>jackson-mapper-lgpl</artifactId>@b@ <version>1.9.12</version>@b@ </dependency>@b@@b@@b@ <!-- tdd5 -->@b@ <dependency>@b@ <groupId>com.googlecode</groupId>@b@ <artifactId>concurrentlinkedhashmap-lru</artifactId>@b@ <version>1.4</version>@b@ </dependency>@b@@b@ <dependency>@b@ <groupId>com.taobao</groupId>@b@ <artifactId>tddl5</artifactId>@b@ <version>5.1.0</version>@b@ <exclusions>@b@ <exclusion>@b@ <groupId>com.taobao.tddl</groupId>@b@ <artifactId>tddl-diamond-client</artifactId>@b@ </exclusion>@b@ <exclusion>@b@ <groupId>com.taobao.tddl</groupId>@b@ <artifactId>tddl-config-diamond</artifactId>@b@ </exclusion>@b@ </exclusions>@b@ </dependency>@b@@b@ <!-- 单元测试 -->@b@ <dependency>@b@ <groupId>junit</groupId>@b@ <artifactId>junit</artifactId>@b@ <version>4.12</version>@b@ <scope>test</scope>@b@ </dependency>@b@@b@ <dependency>@b@ <groupId>emma</groupId>@b@ <artifactId>emma</artifactId>@b@ <version>2.1.5320</version>@b@ <scope>test</scope>@b@ </dependency>@b@@b@ <dependency>@b@ <groupId>org.mockito</groupId>@b@ <artifactId>mockito-all</artifactId>@b@ <version>1.9.5</version>@b@ <scope>test</scope>@b@ </dependency>@b@@b@ <dependency>@b@ <groupId>org.springframework</groupId>@b@ <artifactId>spring-test</artifactId>@b@ <version>4.3.12.RELEASE</version>@b@ <scope>test</scope>@b@ </dependency>@b@@b@ <!-- jetty -->@b@ <dependency>@b@ <groupId>org.eclipse.jetty</groupId>@b@ <artifactId>jetty-security</artifactId>@b@ <version>8.1.14.v20131031</version>@b@ </dependency>@b@ <dependency>@b@ <groupId>org.eclipse.jetty</groupId>@b@ <artifactId>jetty-continuation</artifactId>@b@ <version>8.1.14.v20131031</version>@b@ </dependency>@b@@b@ <dependency>@b@ <groupId>org.eclipse.jetty</groupId>@b@ <artifactId>jetty-servlet</artifactId>@b@ <version>8.1.14.v20131031</version>@b@ </dependency>@b@@b@ <dependency>@b@ <groupId>org.eclipse.jetty</groupId>@b@ <artifactId>jetty-http</artifactId>@b@ <version>8.1.14.v20131031</version>@b@ </dependency>@b@@b@ <dependency>@b@ <groupId>org.eclipse.jetty</groupId>@b@ <artifactId>jetty-server</artifactId>@b@ <version>8.1.14.v20131031</version>@b@ </dependency>@b@@b@ <dependency>@b@ <groupId>org.eclipse.jetty</groupId>@b@ <artifactId>jetty-io</artifactId>@b@ <version>8.1.14.v20131031</version>@b@ </dependency>@b@@b@ <dependency>@b@ <groupId>org.eclipse.jetty</groupId>@b@ <artifactId>jetty-util</artifactId>@b@ <version>8.1.14.v20131031</version>@b@ </dependency>@b@ </dependencies>@b@</dependencyManagement>