• 欢迎访问速搜资源吧,如果在网站上找不到你需要的资源,可以在留言板上留言,管理员会尽量满足你!

【速搜问答】什么是Spring Boot

问答 admin 3周前 (07-13) 39次浏览 已收录 0个评论

汉英对照:
Chinese-English Translation:

Spring Boot是由Pivotal团队提供的全新框架,其设计目的是用来简化新Spring应用的初始搭建以及开发过程。该框架使用了特定的方式来进行配置,从而使开发人员不再需要定义样板化的配置。

Spring boot is a new framework provided by pivot team, which is designed to simplify the initial construction and development process of new spring applications. The framework uses a specific way to configure, so that developers no longer need to define a template configuration.

Spring Boot 是由 Pivotal 团队提供的全新框架,其设计目的是用来简化新 Spring 应用的初始搭建以及开发过程。该框架使用了特定的方式来进行配置,从而使开发人员不再需要定义样板化的配置。通过这种方式,Spring Boot 致力于在蓬勃发展的快速应用开发领域(rapid application development)成为领导者。

Spring boot is a new framework provided by pivot team, which is designed to simplify the initial construction and development process of new spring applications. The framework uses a specific way to configure, so that developers no longer need to define a template configuration. In this way, spring boot is committed to becoming a leader in the booming field of rapid application development.

Spring 框架是 Java 平台上的一种开源应用框架,提供具有控制反转特性的容器。尽管 Spring 框架自身对编程模型没有限制,但其在 Java 应用中的频繁使用让它备受青睐,以至于后来让它作为 EJB(EnterpriseJavaBeans)模型的补充,甚至是替补。Spring 框架为开发提供了一系列的解决方案,比如利用控制反转的核心特性,并通过依赖注入实现控制反转来实现管理对象生命周期容器化,利用面向切面编程进行声明式的事务管理,整合多种持久化技术管理数据访问,提供大量优秀的 Web 框架方便开发等等。Spring 框架具有控制反转(IOC)特性,IOC 旨在方便项目维护和测试,它提供了一种通过 Java 的反射机制对 Java 对象进行统一的配置和管理的方法。

Spring framework is an open source application framework on Java platform, which provides a container with inversion of control. Although the spring framework itself has no restrictions on the programming model, its frequent use in Java applications makes it so popular that it later becomes a supplement or even a substitute for the EJB (Enterprise JavaBeans) model. Spring framework provides a series of solutions for development, such as making use of the core features of inversion of control, and realizing inversion of control through dependency injection to realize the container of management object life cycle, using aspect oriented programming to carry out declarative transaction management, integrating multiple persistent technologies to manage data access, providing a large number of excellent web frameworks to facilitate development, etc. Spring framework has the feature of inversion of control (IOC). IOC is designed to facilitate project maintenance and testing. It provides a method for unified configuration and management of Java objects through java reflection mechanism.

Spring 框架利用容器管理对象的生命周期,容器可以通过扫描 XML 文件或类上特定 Java 注解来配置对象,开发者可以通过依赖查找或依赖注入来获得对象。Spring 框架具有面向切面编程(AOP)框架,SpringAOP 框架基于代理模式,同时运行时可配置;AOP 框架主要针对模块之间的交叉关注点进行模块化。Spring 框架的 AOP 框架仅提供基本的 AOP 特性,虽无法与 AspectJ 框架相比,但通过与 AspectJ 的集成,也可以满足基本需求。Spring 框架下的事务管理、远程访问等功能均可以通过使用 SpringAOP 技术实现。Spring 的事务管理框架为 Java 平台带来了一种抽象机制,使本地和全局事务以及嵌套事务能够与保存点一起工作,并且几乎可以在 Java 平台的任何环境中工作。

Spring framework uses containers to manage the life cycle of objects. Containers can configure objects by scanning XML files or Java annotations on classes. Developers can obtain objects by dependency lookup or dependency injection. Spring framework has aspect oriented programming (AOP) framework. Spring AOP framework is based on proxy mode and can be configured at runtime. AOP framework is mainly for modularization of cross concerns between modules. The AOP framework of spring framework only provides basic AOP features. Although it can not be compared with AspectJ framework, it can also meet the basic requirements by integrating with AspectJ framework. The functions of transaction management and remote access under spring framework can be realized by using spring AOP technology. Spring’s transaction management framework brings an abstract mechanism to the Java platform, which enables local and global transactions and nested transactions to work with savepoints, and can work in almost any environment of the Java platform.

Spring 集成多种事务模板,系统可以通过事务模板、XML 或 Java 注解进行事务配置,并且事务框架集成了消息传递和缓存等功能。Spring 的数据访问框架解决了开发人员在应用程序中使用数据库时遇到的常见困难。它不仅对 Java:JDBC、iBATS/MyBATIs、Hibernate、Java 数据对象(JDO)、ApacheOJB 和 ApacheCayne 等所有流行的数据访问框架中提供支持,同时还可以与 Spring 的事务管理一起使用,为数据访问提供了灵活的抽象。Spring 框架最初是没有打算构建一个自己的 WebMVC 框架,其开发人员在开发过程中认为现有的 StrutsWeb 框架的呈现层和请求处理层之间以及请求处理层和模型之间的分离不够,于是创建了 SpringMVC。

Spring integrates a variety of transaction templates. The system can configure transactions through transaction templates, XML or Java annotations, and the transaction framework integrates the functions of message passing and caching. Spring’s data access framework solves the common difficulties that developers encounter when using databases in their applications. It’s not only right Java:JDBC , ibats / mybatis, hibernate, Java data object (JDO), apacheojb and Apache Cayne are supported in all popular data access frameworks. At the same time, they can be used together with spring’s transaction management to provide flexible abstraction for data access. Spring framework did not intend to build a webmvc framework of its own at first. During the development process, the developers thought that the separation between the presentation layer and the request processing layer of the existing struts web framework and between the request processing layer and the model was not enough, so they created spring MVC.

SpringBoot 框架中还有两个非常重要的策略:开箱即用和约定优于配置。开箱即用,Outofbox,是指在开发过程中,通过在 MAVEN 项目的 pom 文件中添加相关依赖包,然后使用对应注解来代替繁琐的 XML 配置文件以管理对象的生命周期。这个特点使得开发人员摆脱了复杂的配置工作以及依赖的管理工作,更加专注于业务逻辑。约定优于配置,Convention over configuration,是一种由 SpringBoot 本身来配置目标结构,由开发者在结构中添加信息的软件设计范式。这一特点虽降低了部分灵活性,增加了 BUG 定位的复杂性,但减少了开发人员需要做出决定的数量,同时减少了大量的 XML 配置,并且可以将代码编译、测试和打包等工作自动化。

There are also two very important strategies in the springboot framework: out of the box and convention over configuration. Out of the box refers to managing the life cycle of an object by adding related dependency packages to the POM file of Maven project, and then using corresponding annotations to replace the tedious XML configuration file. This feature enables developers to get rid of complex configuration work and dependency management, and focus more on business logic. Convention over configuration is a software design paradigm in which spring boot configures the target structure and developers add information to the structure. Although this feature reduces some flexibility and increases the complexity of bug location, it reduces the number of decisions developers need to make, and reduces a large number of XML configuration, and can automate code compilation, testing and packaging.

SpringBoot 应用系统开发模板的基本架构设计从前端到后台进行说明:前端常使用模板引擎,主要有 FreeMarker 和 Thymeleaf,它们都是用 Java 语言编写的,渲染模板并输出相应文本,使得界面的设计与应用的逻辑分离,同时前端开发还会使用到 Bootstrap、AngularJS、JQuery 等;在浏览器的数据传输格式上采用 Json,非 xml,同时提供 RESTfulAPI;SpringMVC 框架用于数据到达服务器后处理请求;到数据访问层主要有 Hibernate、MyBatis、JPA 等持久层框架;数据库常用 MySQL;开发工具推荐 IntelliJIDEA。

The basic architecture design of springboot application system development template is explained from the front end to the background: the front-end often uses template engines, mainly FreeMarker and thymeleaf, which are written in Java language, render templates and output corresponding text, so as to separate the interface design and application logic. At the same time, the front-end development also uses bootstrap, angularjs, jQuery In the browser data transmission format, it adopts JSON, non XML, and provides restful API; the spring MVC framework is used to process the request after the data arrives at the server; to the data access layer, it mainly includes hibernate, mybatis, JPA and other persistence layer frameworks; MySQL is commonly used in databases; intellijidea is recommended as development tools.


速搜资源网 , 版权所有丨如未注明 , 均为原创丨转载请注明原文链接:【速搜问答】什么是Spring Boot
喜欢 (0)
[361009623@qq.com]
分享 (0)
发表我的评论
取消评论
表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址