SpringBoot框架各个模块中英文简介

Posted by

SpringBoot框架是一个非常牛逼,非常牛逼,非常牛逼的Java/kotlin的开发框架。本文简单介绍下SpringBoot框架各个模块(modules),根据github官方仓库的英文进行对照翻译。水平有限,如果翻译有错误或者不足之处,敬请留言指出。

SpringBoot框架的spring-boot模块

英文原文:

The main library providing features that support the other parts of Spring Boot, these include:

  • The SpringApplication class, providing static convenience methods that make it easy to write a stand-alone Spring Application. Its sole job is to create and refresh an appropriate Spring ApplicationContext
  • Embedded web applications with a choice of container (Tomcat, Jetty or Undertow)
  • First class externalized configuration support
  • Convenience ApplicationContext initializers, including support for sensible logging defaults

中文翻译:

这个主库为 Spring Boot框架的其他部分模块的功能提供支持,这些包括:

  • SpringApplication 这个类,提供静态的简便的方法用于轻松的创建一个单独的Spring应用程序。他唯一的工作是去创建和刷新一个适当的Spring应用程序场景。
  • 开启附带一个可选的web服务容器(Tomcat,Jetty或者Undertow)的web应用程序。
  • 第一类外部配置的支持
  • 简化应用程序场景的初始化,默认包含一个合理的日志支持。

SpringBoot框架的spring-boot-autoconfigure模块

英文原文:

Spring Boot can configure large parts of common applications based on the content of their classpath. A single @EnableAutoConfiguration annotation triggers auto-configuration of the Spring context.

Auto-configuration attempts to deduce which beans a user might need. For example, if HSQLDB is on the classpath, and the user has not configured any database connections, then they probably want an in-memory database to be defined. Auto-configuration will always back away as the user starts to define their own beans.

中文翻译:

Spring Boot能够配置相当大一部分通用的应用程序配置,基于其类路径的内容。一个单独的 @EnableAutoConfiguration 注解触发当前Spring应用场景的自动配置。

自动配置试图去推断哪一个bean是一个用户可能需要的。举个例子,如果HSQLDB是在一个类的路径上,并且这个用户没有配置任何数据库连接,那么他们可能想用一个被定义的内存型数据库。当用户开始定义他们自己的beans时,自动配置将总是回退。

SpringBoot框架的spring-boot-starters模块

英文原文:

Starters are a set of convenient dependency descriptors that you can include in your application. You get a one-stop-shop for all the Spring and related technology that you need without having to hunt through sample code and copy paste loads of dependency descriptors. For example, if you want to get started using Spring and JPA for database access just include the spring-boot-starter-data-jpa dependency in your project, and you are good to go.

中文翻译:

启动器是一个便利的将那些能包含在你应用程序中的依赖描述符。您可以获得所需的所有Spring及相关技术的一站式服务,而无需通过示例代码搜索并复制粘贴依赖描述符。举个例子,如果你想要去获取使用Spring和JPA用于数据库访问,只需要包含spring-boot-starter-data-jpa这个依赖到你的项目中,并且你很好往下走。

SpringBoot框架的spring-boot-cli模块

英文原文:

The Spring command line application compiles and runs Groovy source, making it super easy to write the absolute minimum of code to get an application running. Spring CLI can also watch files, automatically recompiling and restarting when they change.

中文翻译:

这个Spring命令行应用程序编译并且执行Groovy源代码,超级容易的使用它去编写绝对迷你的代码去获得一个应用程序的执行。Spring CLI也能查看文件,自动重新编译并且当代码发生改变时重新启动。

SpringBoot框架的spring-boot-actuator模块

英文原文:

Actuator endpoints let you monitor and interact with your application. Spring Boot Actuator provides the infrastructure required for actuator endpoints. It contains annotation support for actuator endpoints. Out of the box, this module provides a number of endpoints including the HealthEndpointEnvironmentEndpointBeansEndpoints and many more.

中文翻译:

执行器的端点让你监控并且和你的应用程序相互作用。Spring Boot的执行器提供执行器端点请求的基础设施,它包含为执行器端点提供的注解支持。开箱即用,这个模块已经提供了很多端点,包括健康端点,环境端点,Beans端点和其他更多。

SpringBoot框架的spring-boot-actuator-autoconfigure模块

英文原文:

This provides auto-configuration for actuator endpoints based on the content of the classpath and a set of properties. For instance, if Micrometer is on the classpath, it will auto-configure the MetricsEndpoint. It contains configuration to expose endpoints over HTTP or JMX. Just like Spring Boot AutoConfigure, this will back away as the user starts to define their own beans.

中文翻译:

这个模块基于内容的类路径和一个属性的集合提供执行器端点的自动配置。举个例子,如果Micrometer在类的路径上,它将自动配置MetricsEndpoint这个端点。它包含通过HTTP或JMX公开端点的配置。与Spring Boot AutoConfigure相似,当用户开始定义他们自己的beans时,自动配置将总是回退。

SpringBoot框架的spring-boot-test模块

英文原文:

This module contains core items and annotations that can be helpful when testing your application.

中文翻译:

这个模块包含那些当测试你的应用程序有用的核心成员和注解。

SpringBoot框架的spring-boot-test-autoconfigure模块

英文原文:

Like other Spring Boot Auto-Configuration modules, spring-boot-test-autoconfigure, provides auto-configuration for tests based on the classpath. It includes a number of annotations that can be used to automatically configure a slice of your application that needs to be tested.

中文翻译:

就像其他的Spring Boot自动配置模块,spring-boot-test-autoconfigure为基于类路径的测试提供自动配置。它包含相当多的能被用于自动配置的你的应用程序中需要被测试的那一部分的注解。

SpringBoot框架的spring-boot-loader模块

英文原文:

Spring Boot Loader provides the secret sauce that allows you to build a single jar file that can be launched using java -jar. Generally you will not need to use spring-boot-loader directly, but instead work with the Gradle or Maven plugin.

中文翻译:

Spring Boot加载器提供秘密sauce(酱油)那些允许你去构建一个单独的能被使用java -jar加载的jar文件。通常你将不需要直接去使用spring-boot-loader模块,但是使用Gradle或者Maven插件替代他们的工作。

SpringBoot框架的spring-boot-devtools模块

英文原文:

The spring-boot-devtools module provides additional development-time features such as automatic restarts, for a smoother application development experience. Developer tools are automatically disabled when running a fully packaged application.

中文翻译:

spring-boot-devtools这个模块提供额外开发时的功能诸如自动重启,以获得更流畅的应用程序开发体验。开发者工具是自动关闭的,当你运行一个完整的应用程序包。

卧槽,翻译这个东西,也很累的。希望对大家有帮助!

Leave a Reply

您的电子邮箱地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据