Spring Eco-Profile

table of Contents

Outline

Java developers who do mention Spring, the first to come out in my mind is "IoC", "AOP", "Spring MVC", "Spring Security" and so on these terms, even a great "is not no Spring Java" feeling .
In fact, to date Spring is no longer a simple programming framework, and from the initial "SSH framework" to today, Struts and Hibernate are programmers had almost disappeared from sight, and has developed into a Spring very large and complete ecosystem.
Therefore, unless otherwise specified framework Spring is a specific ecological, otherwise lift the "Spring" should refer to the entire Spring ecology.
To be no exaggeration, then, Java programmers proficient as long as the Spring, also mastered the essence of Java development.

Contains many specific applications in the framework of a specific scene in the entire Spring ecology, such as: "Spring Framework", "Spring Security", "Spring Boot", "Spring Cloud" and the like, wherein "Spring Framework" Framework entire ecological the core foundation, other frameworks need to rely on "Spring framework" provides basic functions, and each frame has its own separate code repository.

Spring projects under eco-divided into three categories: major projects (Main Projects), community programs (Community Projects), has been terminated but the project is still reserved (Projects in the Attic).
The latest Spring Eco-item list see: https://spring.io/projects .

project instruction

main project

Currently, Spring Eco contains 22 active major projects.
Spring eco major projects

1.Spring Framework

Spring Framework project is the basis for the entire Spring ecology, including the core Spring functionality, such as: IoC, AOP, Spring MVC, etc., or other items that need to rely on Spring Framework.
Also, note that the Spring Framework in turn contain a plurality of sub-modules, such as: spring-core, spring-beans , spring-context, spring-aop, spring-web, spring-webmvc like. In fact, Spring Framework project is a modular architecture, and there are dependencies between modules. We use the most is actually Spring MVC module spring-webmvc background in Java Web project, which follows other module dependencies shown:
Spring MVC dependencies on other modules

Clearly, the spring-webmvcmodule dependencies spring-context, spring-aopand spring-web.
Spring-webmvc dependencies module

2.Spring Boot

Spring Boot is a development project based on Spring scaffolding, it defaults to the integration of an embedded Tomcat, configuration notes, supporting rapid integration of third-party development components (such as MyBatis), greatly reduce the threshold of using Spring, and many can be built directly functional production environment, is the best choice for the development of micro-services architecture projects.
It is worth noting: Many people new to Spring Boot it a myth, of course, the use of Spring Boot to quickly develop a robust, can be directly run the project, but its core and foundation from Spring Framework. For heavily dependent Spring developers should go thoroughly understand the Spring Framework, as long as the real master of the Spring Framework to achieve the principle of each module, for the use of Spring Boot encountered in the actual development will be solved.

3.Spring Cloud

Spring Cloud为开发基于微服务架构的软件系统提供了一整套工具集合,其中包含了开发各个微服务组件的具体项目,如:Spring Cloud Config(配置中心),Spring Cloud Netflix(服务注册中心),Spring Cloud Sleuth(服务调用监控),Spring Cloud Gateway(服务网关)等等。
Spring Cloud的基础是Spring Boot,基于Spring Boot可以大大简化开发各微服务组件的流程。

4.Spring Cloud Data Flow

Spring Cloud Data Flow用于构建在云环境或K8S中基于微服务的实时或批数据处理架构,具体来讲就是支持一系列需要进行数据处理的场景,如:ETL,数据导入/导出,事件流,预测分析等等。

5.Spring Data

Spring Data旨在提供一套基于Spring编程模型的数据访问API,是一个数据访问框架集合,其中包含了多个具体的支持不同方式访问特定数据库类型的子模块,如:Spring Data JDBC(使用JDBC方式访问关系型数据库),Spring Data MongoDB(访问MongoDB数据库)等。
这个模块的功能类似于MyBatis这样的专门的ORM框架,在实际开发中可以根据需求进行灵活选择。

6.Spring Integration

Spring Integration的目的是提供一个简单的模型,用于构建企业级应用集成解决方案。

7.Spring Batch

Spring Batch是一个轻量级的批处理框架,旨在开发对企业系统日常运营至关重要的强大批处理应用程序。
支持事务管理,提供了基于Web的管理接口。

8.Spring Security

Spring Security是用于实现认证和授权,以及访问控制的安全框架,在Java生态与之提供类似的功能还有一个框架:Apache Shiro
Spring Security依赖于Spring Framework,也就是说如果要Spring Security,那么应用架构也必须是基于Spring Framework的,这大大限制了Spring Security的使用场景;反之,Shiro就没有这样限制,而且从项目架构上Shiro更加简洁。当然,Spring Security提供了非常丰富的安全控制的功能,在某些方面甚至比Shiro更加完善,与之对应的是掌握的Spring Security的复杂度比较大。因此,对于在应用中是否选择Spring Security需要根据实际需求来决定。

9.Spring HATEOAS

如果Web应用基于Spring框架(即:使用了Spring MVC)开发,那么可以直接使用Spring HATEOAS来开发满足HATEOAS约束的RESTFul服务。
这里需要理解一个单词简写:“HATEOAS”。HATEOAS(Hypermedia as the engine of application state)是REST架构风格中最复杂的约束,也是构建成熟REST服务的核心。它的重要性在于打破了客户端和服务器之间严格的契约,使得客户端可以更加智能和自适应,而 REST 服务本身的演化和更新也变得更加容易。

10.Spring REST Docs

Spring REST Docs是一个文档工具,用于为REST架构风格的Web服务自动生成相应的文档,这样可以解放开发者专门撰写API文档的工作。

11.Spring AMQP

Spring AMQP项目旨在将核心的Spring概念应用于基于AMQP的消息传递解决方案的开发中,它提供了一个“模板”的抽象用于发送和接收消息。

12.Spring Mobile

Spring Mobile是对Spring MVC的扩展,旨在简化移动Web应用的开发。
Spring Mobile可以检测出当前请求使用的设备是PC、还是手机或者是平板以及用户设备是安卓平台还是iOS平台,然后根据请求设备的不同,返回适合该设备的视图。

13.Spring For Android

虽然官方的说法是Spring For Android旨在简化原声Android应用的开发,但其实这个有点太过于牵强。
Spring For Android提供了2个对原生Android应用开发的支持:
(1)提供了一个REST客户端
(2)支持访问安全API时的认证

14.Spring Web Flow

Spring Web Flow主要应用于需要在Web页面上创建引导用户执行类似“下一步”这样的基于流程的应用场景,该框架构建于Spring MVC之上。

15.Spring Web Services

Spring Web Services用于开发WebService服务,类似的框架如:Apache CXFApache Axis2

16.Spring LDAP

Spring LDAP是一个工具,用于为基于Spring的应用程序使用LDAP(Lightweight Directory Access Protocol)协议。

17.Spring Session

Spring Session提供了管理用户Session信息的API和对应实现,Spring Session使得支持集群会话变得简单,而不依赖于特定于应用程序容器的解决方案。
简单来讲,传统的Session方案依赖于特定的容器(如:Tomcat),Spring Session就是提供独立于特定容器的Session解决方案。
其实,针对Tomcat容器,Session集群化也有一个开源方案:tomcat-redis-session-manager

18.Spring Shell

Spring Shell用于开发基于命令行交互的应用。

19.Spring FLO

Spring FLO是一个JavaScript类库,是Spring Cloud Data Flow中流构建器的基础。

20.Spring Kafka

Spring Kafka用于在Spring项目中与Kafka交互。

21.Spring Statemachine

Spring Statemachine是一个为开发人员在Spring项目中使用状态机的框架,帮助开发者简化状态机的开发过程,让状态机结构更加层次化。

22.Spring IO Platform

简单来说,Spring IO Platform是一个对项目依赖进行统一版本管理的工具。本质就是一个pom文件,它记录了Spring项目和其它第三方库对应的版本信息。

社区项目

社区项目目前只有2个:Spring ROO,Spring Scala。

1.Spring ROO:这是一个开发工具包,旨在快速构建一个Java应用。
2.Spring Scala:支持在Scala中使用Spring框架。

保留项目

某些项目已经终止了,但是仍然保留着,不必赘述。

最后总结

Spring是一个生态系统,提供许多有用的编程框架或工具集。
本文的目的不在于详细介绍Spring生态的每一个项目,而是通过一个全面的整理,对Spring生态有一个完整的认识,在实际中根据需要灵活选择对应的组件来使用即可。
可以明确的是,当下最为流行的Spring项目是这4个:Spring FrameworkSpring SecuritySpring BootSpring Cloud
如下图所示,再次对Spring生态做一个概括性总结。
Spring Eco-generalization

【参考】
https://www.ibm.com/developerworks/cn/java/j-lo-SpringHATEOAS/index.html 使用 Spring HATEOAS 开发 REST 服务
https://www.jianshu.com/p/f9024eb3f252 使用Spring Mobile实现网站移动端适配及更换主题
https://blog.csdn.net/csdn_xuexiaoqiang/article/details/65938744 Spring学习笔记之Spring Web Flow
https://www.hifreud.com/2015/02/27/08-spring-mvc-spring-web-service/ Spring 使用笔记之(五) - Spring-ws实现基于契约优先的WebService
https://www.ibm.com/developerworks/cn/web/wa-spring-session-architecture-and-design/index.html 详解 Spring Session 架构与设计
https://www.ibm.com/developerworks/cn/java/spring-shell-application/index.html 使用 Spring Shell 开发 Java 命令行应用
http://blog.didispace.com/spring-statemachine/Use Spring StateMachine framework implements a state machine
https://www.jianshu.com/p/dd0baba45f52 the Spring IO Platform Introduction
https://segmentfault.com/a/1190000012743018 the Spring IO Platform project description and application
https: //www.cnblogs .com / chenpi / the p-/ 6295855.html the Spring IO Platform Introduction and examples

Guess you like

Origin www.cnblogs.com/nuccch/p/10958254.html