spring框架

Spring Framework is one of the most popular Java EE frameworks.

Spring框架是最受欢迎的Java EE框架之一。

In this article, we will learn about the following:

在本文中,我们将学习以下内容:

  • Spring framework architectureSpring框架架构
  • Core components of SpringSpring的核心组件
  • Various projects under the spring framework umbrella.春天框架下的各种项目。


I looked at the Google Trends chart for Spring Framework, Servlet, JSP, and JSF. It’s clear that Spring is far ahead from all other Java EE technologies.

我查看了Spring框架,Servlet,JSP和JSF的Google趋势图表。 显然,Spring远远领先于所有其他Java EE技术。

Spring Framework – Google Trends

Spring Framework – Google趋势

什么是Spring Framework? (What is Spring Framework?)

Spring is one of the most popular frameworks for Java enterprise edition.

Spring是Java企业版最受欢迎的框架之一。

Developers all over the world use Spring for developing reliable and high-quality applications.

全世界的开发人员都使用Spring开发可靠和高质量的应用程序。

The spring framework was designed by Rod Johnson. Since then Spring has become an alternative technology in Java world for the EJB model.

弹簧框架是由Rod Johnson设计的。 从那时起,Spring成为Java世界中EJB模型的替代技术。

You can create different kinds of applications using the spring framework.

您可以使用spring框架创建各种类型的应用程序。

Spring核心概念– DI,IoC,AOP (Spring Core Concepts – DI, IoC, AOP)

  • It is impossible to understand what is Spring Framework without understanding what is Dependency Injection and Inversion of Control. Dependency Injection also called as DI, is one of the types of Inversion of Control (IoC).如果不了解什么是依赖注入和控制反转,就不可能了解什么是Spring Framework。 依赖注入也称为DI,是控制反转(IoC)的类型之一。
  • Inversion of Control – this is the principle of object-oriented programming, in which objects of the program do not depend on concrete implementations of other objects, but may have knowledge about their abstractions (interfaces) for later interaction.控制反转 -这是面向对象编程的原理,其中程序对象不依赖于其他对象的具体实现,但可能具有有关其抽象(接口)的知识,以便以后进行交互。
  • Dependency Injection – is a composition of structural design patterns, in which for each function of the application there is one, a conditionally independent object (service) that can have the need to use other objects (dependencies) known to it by interfaces. Dependencies are transferred (implemented) to the service at the time of its creation. This is a situation where we introduce an element of one class into another. In practice, DI is implemented by passing parameters to the constructor or using setters. Libraries that implement this approach are also called IoC containers.依赖注入 –是结构设计模式的组成,其中对于应用程序的每个功能都有一个条件独立对象(服务),可能需要使用接口已知的其他对象(依赖项)。 在创建服务时,依赖关系已传输(实现)到服务。 在这种情况下,我们将一个类的元素引入另一个类。 实际上,DI是通过将参数传递给构造函数或使用setter来实现的。 实现此方法的库也称为IoC容器。
  • Aspect oriented programming – a programming paradigm that allows you to distinguish cross-through (functional) functionality in application. These functions, which span multiple application nodes, are called cross-cutting concerns and these cross-cutting notes are separated from the immediate business logic of the application. In OOP, the key unit is the class, while in AOP, the key element is the aspect. DI helps to separate application classes into separate modules, and AOP helps to separate cross-cutting concerns from the objects they affect.面向方面的编程 –一种编程范例,可让您区分应用程序中的穿越(功能)功能。 这些跨越多个应用程序节点的功能称为跨领域关注点,并且这些跨领域注释与应用程序的直接业务逻辑分开。 在OOP中,关键单元是类,而在AOP中,关键元素是方面。 DI帮助将应用程序类分离到单独的模块中,而AOP帮助将横切关注点与它们所影响的对象分离。

Spring框架架构 (Spring Framework Architecture)

Spring Framework is divided into a number of separate modules, which allows you to decide which ones to use in your application. The below image illustrates the most important modules of Spring Framework architecture.

Spring Framework分为多个独立的模块,可让您决定在应用程序中使用哪些模块。 下图说明了Spring Framework体系结构中最重要的模块。

Let’s look into spring ecosystem modules one by one.

让我们逐一研究Spring生态系统模块。

Spring Framework核心组件 (Spring Framework Core Components)

The Core container from Spring consists of four modules: SpEL , Context, Core, Beans. Description for these elements are as follows:

Spring的Core容器包含四个模块:SpEL,Context,Core,Beans。 这些元素的说明如下:

  1. The SpEL module provides a powerful expression language for manipulating objects during execution.SpEL模块提供了一种功能强大的表达语言,用于在执行过程中操纵对象。
  2. Context is built on the basis of Beans and Core and allows you to access any object that is defined in the settings. The key element of the Context module is the ApplicationContext interface.上下文是基于Beans和Core构建的,它允许您访问设置中定义的任何对象。 上下文模块的关键元素是ApplicationContext接口。
  3. The Core module provides key parts of the framework including IoC and DI properties.核心模块提供了框架的关键部分,包括IoC和DI属性。
  4. The Bean module is responsible for creating and managing Spring Beans – is application context structure unit.Bean模块负责创建和管理Spring Bean –是应用程序上下文结构单元。

Spring Framework网站 (Spring Framework Web)

Spring framework Web layer consists of Web, Web-MVC, Web-Socket, Web-Portlet etc.

Spring框架Web层由Web,Web-MVC,Web-Socket,Web-Portlet等组成。

  1. The Web module provides functions such as downloading files, creating web application, rest web service etc.Web模块提供诸如下载文件,创建Web应用程序,REST Web服务等功能。
  2. Web-MVC contains a Spring MVC implementation for web applications.Web-MVC包含用于Web应用程序的Spring MVC实现。
  3. Web-Socket provides support for communication between the client and the server, using Web-Sockets in web applications.Web-Socket使用Web应用程序中的Web-Socket提供对客户端与服务器之间通信的支持。
  4. Web-Portlet provides MVC implementation with portlet environmentWeb-Portlet通过Portlet环境提供MVC实现

Spring Framework数据访问 (Spring Framework Data Access)

The Data Access/Integration container consists of JDBC, ORM, OXM, JMS and the Transactions module.

数据访问/集成容器由JDBC,ORM,OXM,JMS和Transactions模块组成。

  1. JDBC provides an abstract layer of JDBC and eliminates the need for the developer to manually register the monotonous code associated with connecting to the database.JDBC提供了JDBC的抽象层,并且使开发人员无需手动注册与连接数据库相关的单调代码。
  2. Spring ORM provides integration with popular ORMs such as Hibernate, JDO, which are implementations of JPA.Spring ORM提供了与流行的ORM(例如Hibernate,JDO)的集成,这些ORM是JPA的实现。
  3. The OXM module is responsible for linking the Object / XML – XMLBeans, JAXB, etc.OXM模块负责链接对象/ XML – XMLBeans,JAXB等。
  4. The JMS (Java Messaging Service) module is responsible for creating, sending and receiving messages.JMS(Java消息服务)模块负责创建,发送和接收消息。
  5. Transactions supports transaction management for classes that implement certain methods and POJOs.事务支持对实现某些方法和POJO的类的事务管理。

杂项模块 (Miscellaneous Modules)

Spring also includes a number of other important modules, such as AOP, Aspects, Instrumentation, Messaging, and Test.

Spring还包括许多其他重要模块,例如AOP,Aspects,Instrumentation,Messaging和Test。

  1. AOP implements aspect-oriented programming and allows using the entire arsenal of AOP capabilities.AOP实现面向方面的编程,并允许使用AOP功能的整个库。
  2. The Aspects module provides integration with AspectJ, which is also a powerful AOP framework.Aspects模块提供与AspectJ的集成,后者也是一个功能强大的AOP框架。
  3. Instrumentation is responsible for supporting class instrumentation and class loader, which are used in server applications.工具负责支持在服务器应用程序中使用的类工具和类加载器。
  4. The Messaging module provides STOMP support.消息模块提供STOMP支持。
  5. Finally, the Test module provides testing using TestNG or the JUnit Framework.最后,Test模块使用TestNG或JUnit Framework提供测试。

Spring 5功能 (Spring 5 Features)

Spring 5 brought massive update to Spring 4. Some of the important features of Spring 5 are:

春天5带来了大量的更新,春天4.一些重要特点弹簧5是:

  1. Support for Java 8, Java 9, Java EE 7, Java EE 8, Servlet 4.0, Bean Validation 2.0, and JPA 2.2. I am happy to see that Spring is trying to catch up with latest versions of major technologies being used.支持Java 8,Java 9,Java EE 7,Java EE 8,Servlet 4.0,Bean验证2.0和JPA 2.2。 我很高兴看到Spring试图赶上正在使用的主要技术的最新版本。
  2. Improved Logging with new module – spring-jcl.使用新模块– spring-jcl改进了日志记录。
  3. File operations are using NIO 2 streams, hence improved performance.文件操作使用NIO 2流,因此提高了性能。
  4. Support for Reactor 3.1 Flux and Mono as well as RxJava 1.3 and 2.1 as return values from Spring MVC controller methods.支持Reactor 3.1 Flux和Mono以及RxJava 1.3和2.1作为Spring MVC控制器方法的返回值。
  5. Support for Kotlin, Project Lombok, JSON Binding API as an alternative to Jackson and GSON.支持Kotlin,Project Lombok,JSON Binding API,作为Jackson和GSON的替代方案。
  6. Spring WebFlux – Spring getting Reactive.Spring WebFlux –春天变得活跃起来 。
  7. Support for JUnit 5支持JUnit 5
  8. Functional programming support through Kotlin.通过Kotlin提供功能编程支持。
GitHub Repository.GitHub Repository上签出Spring Projects。

References: Spring Official Website, Spring Reference Documentation

参考资料: Spring官方网站 , Spring参考文档

翻译自: https://www.journaldev.com/16922/spring-framework

spring框架

spring框架_Spring框架相关推荐

  1. spring框架mvc框架_Spring的MVC测试框架入门–第1部分

    spring框架mvc框架 最新推出的主要Spring框架是Spring MVC测试框架,Spring Guys声称它是"一流的JUnit支持,可通过流畅的API测试客户端和服务器端Spri ...

  2. spring框架mvc框架_Spring MVC测试框架入门–第2部分

    spring框架mvc框架 这个迷你系列的第一个博客介绍了Spring MVC测试框架,并演示了其在单元测试Spring MVC Controller类中作为控制器而不是POJO进行单元测试的用途. ...

  3. spring mysql 多数据源_spring框架学习【多数据源配置】

    在我们的项目中遇到这样一个问题:我们的项目需要连接多个数据库,而且不同的客户在每次访问中根据需要会去访问不同的数据库.我们以往在spring和hibernate框架中总是配置一个数据源,因而sessi ...

  4. python spring框架_Spring Python

    Spring Python Spring Python是基于Java的Spring框架(Spring Framework)和Spring安全(Spring Security)的一个分支,它以Pytho ...

  5. ssh(Struts+spring+Hibernate)三大框架整合-简述

    ssh(Struts+spring+Hibernate)三大框架配合使用来开发项目,是目前javaee最流行的开发方式,必须掌握: 注意: 为了稳健起见,每加入一个框架,我们就需要测试一下,必须通过才 ...

  6. spring mvc + mybatis 框架搭建 ( idea + gradle)

    spring mvc + mybatis 框架搭建 idea + gradle 刚刚入门,只是个人见解,如有错误或者问题欢迎指出指正. 邮箱: [ wgh0807@qq.com ] 文章引用: [ap ...

  7. Spring MVC测试框架

    原文链接:http://jinnianshilongnian.iteye.com/blog/2004660 Spring MVC测试框架详解--服务端测试 博客分类: springmvc杂谈 spri ...

  8. Spring JDBC-混合框架的事务管理

    概述 问题 解决方案 示例Hibernate Spring JDBC 概述 Spring 抽象的 DAO 体系兼容多种数据访问技术,它们各有特色,各有千秋. Hibernate 是非常优秀的 ORM ...

  9. Spring集成MyBatis框架

    Spring集成MyBatis框架 Java在写数据库查询时,我接触过四种方式: 1.纯Java代码,引用对应的数据库驱动包,自己写连接与释放逻辑(可以用连接池) 这种模式实际上性能是非常不错的,但是 ...

最新文章

  1. jdk 中英对照 百度网盘_Hadoop部署一jdk与MySQL
  2. COMET彗星(三)构建自己的COMET核心
  3. Ubuntu开发环境配置--- 安装chrome浏览器
  4. window.onload与document.ready的区别
  5. YACC、LEX、JAVACC-------常用的编译工具
  6. WebApi实现验证授权Token,WebApi生成文档等 - CSDN博客
  7. PAT 乙级 1042. 字符统计(20) Java版
  8. python爬取去哪网数据_Python爬虫入门:使用Python爬取网络数据
  9. 简单读取winfrom资源文件
  10. AI发票扫描识别sdk软件接口
  11. jQuery 倒计时插件
  12. matlab简单几何图形的识别代码,MATLAB识别几何图形
  13. matlab 单相整流电路,基于MATLAB的单相桥式整流电路研究
  14. 华为S5700交换机登录认证配置学习笔记
  15. Excel数据分析(七)第六章数据透视表
  16. input框不可编辑的三种方法
  17. 公司创业板上市与普通员工有关?
  18. 解决 GlobalSign 证书导致 Mac 上京东、淘宝等网站打不开的问题
  19. (三)爬取一些网页图片
  20. C++设计模式 - 观察者模式(Observer)

热门文章

  1. C Coding Standard
  2. [独孤九剑]持续集成实践(二)– MSBuild语法入门
  3. iOS常用第三方类库
  4. 如何在网页中每小时更新一次数据?
  5. [转载] python输入一个年份、输出是否为闰年_Python程序检查给定年份是否为闰年
  6. [转载] Python 内置函数 lambda、filter、map、reduce
  7. 面向对象及软件工程——团队作业3
  8. 批处理脚本学习笔记——程序猿版
  9. mysqlbinlog初识
  10. 切图时图片的选择:JPG、PNG、GIF的区别