Spring makes it easy to create Java enterprise applications. It provides everything you
need to embrace the Java language in an enterprise environment, with support for Groovy
and Kotlin as alternative languages on the JVM, and with the flexibility to create many
kinds of architectures depending on an application's needs. As of Spring Framework 5.1,
Spring requires JDK 8+ (Java SE 8+) and provides out-of-the-box support for JDK 11 LTS.
Java SE 8 update 60 is suggested as the minimum patch release for Java 8, but it is
generally recommended to use a recent patch release.java
Spring使得Java企业应用开发变得简单。它提供了在企业环境中使用Java语言所须要的一切而且能够根据应用的需求灵活的构建多种架构,同时也支持Groovy和Kotlin这些基于JVM使用的替代语言。从Spring框架5.1开始,使用Spring须要JDK8+(Java SE 8+)版本而且也提供了对JDK11 LTS版本的支持。建议将Java SE8第60个更新版本做为使用Java8的最小修订版本,可是一般推荐使用最新修订版。react
Spring supports a wide range of application scenarios. In a large enterprise, applications
often exist for a long time and have to run on a JDK and application server whose upgrade
cycle is beyond developer control. Others may run as a single jar with the server embedded,
possibly in a cloud environment. Yet others may be standalone applications (such as batch
or integration workloads) that do not need a server.ios
Spring支持普遍的应用场景。在大型企业中,一般应用程序是长时间存在而且运行在一个更新周期不受开发人员控制的JDK和应用服务器上。其余的可能就是运行在内嵌服务器或者云环境上的一个独立jar。还有一些可能就是不须要服务器的独立应用程序(好比批处理或者集成负载)。git
Spring is open source. It has a large and active community that provides continuous feedback
based on a diverse range of real-world use cases. This has helped Spring to successfully
evolve over a very long time.github
Spring是开源项目,它拥有一个庞大且活跃的社区,而且可以从各类实际使用案例中获得持续的反馈。这也是在Spring在长期发展中走向成功的缘由。web
The term "Spring" means different things in different contexts. It can be used to refer to
the Spring Framework project itself, which is where it all started. Over time, other Spring
projects have been built on top of the Spring Framework. Most often, when people say
"Spring", they mean the entire family of projects. This reference documentation focuses on
the foundation: the Spring Framework itself.spring
“Spring”一词在不一样的上下中表明的含义不尽相同。它能够表明着Spring Framework项目自己,也能够说是它一切的开始。随着时间的推移,也有不少其余的Spring项目在Spring Framework基础上开发出来。一般人们所说的“Spring”表明的是整个项目系列。本参考文档重点关注的是Spring框架自身。服务器
The Spring Framework is divided into modules. Applications can choose which modules they need.
At the heart are the modules of the core container, including a configuration model and a
dependency injection mechanism. Beyond that, the Spring Framework provides foundational
support for different application architectures, including messaging, transactional data and
persistence, and web. It also includes the Servlet-based Spring MVC web framework and, in
parallel, the Spring WebFlux reactive web framework.架构
Spring框架被分红了多个模块,应用程序能够在使用时选择他们所须要的模块。核心容器的核心模块包含配置模式以及依赖注入机制。除此以外,Spring框架还提供了对不一样应用架构的功能支持,包括消息传递、数据事务和持久化以及WEB。它还包含了基于Servlet的SpringMVC Web框架以及与之并行存在Spring WebFlux响应式Web框架。app
A note about modules: Spring's framework jars allow for deployment to JDK 9's module path
("Jigsaw"). For use in Jigsaw-enabled applications, the Spring Framework 5 jars come with
"Automatic-Module-Name" manifest entries which define stable language-level module names
("spring.core", "spring.context" etc) independent from jar artifact names (the jars follow
the same naming pattern with "-" instead of ".", e.g. "spring-core" and "spring-context").
Of course, Spring's framework jars keep working fine on the classpath on both JDK 8 and 9+.
关于模块化注意点:Spring框架支持部署到JDK9的模块化路径("Jigsaw")。为了在启用Jigsaw的应用程序中使用,在Spring5的jar中加入了“Automatic-Module-Name”清单列表用于定义独立于jar包名(这些jar遵循着相同的命名模式:使用“-”代替“.”,如:"spring-core"和"spring-context")的标准语言级别的模块化名称(好比"spring.core"和"spring.context")。固然,Spring框架jar在JDK8和JDK9+类路径上很好的运行。
When you learn about a framework, it’s important to know not only what it does but what
principles it follows. Here are the guiding principles of the Spring Framework:
当学习一个框架时,很重要的一点是不只要了解它的原理也要遵循它的设计原则。如下是Spring框架的指导原则。
For how-to questions or diagnosing or debugging issues, we suggest using StackOverflow,
and we have a https://spring.io/questions[questions page] that lists the suggested tags to use.
If you're fairly certain that there is a problem in the Spring Framework or would like
to suggest a feature, please use the https://github.com/spring-pro...[GitHub Issues].
对于如何提问、诊断以及调试之类的问题,咱们建议使用StackOverflow,以及咱们的 https://spring.io/questions[问题页面] 列出了一些使用建议标签。若是你很是肯定Spring框架存在问题或者你想提出一些新功能,请到 https://github.com/spring-pro...[GitHub Issues]反馈。
If you have a solution in mind or a suggested fix, you can submit a pull request on
https://github.com/spring-pro...[Github]. However, please keep in mind
that, for all but the most trivial issues, we expect a ticket to be filed in the issue
tracker, where discussions take place and leave a record for future reference.
若是您有解决方案或者建议的解决方案,你能够到 https://github.com/spring-pro...[Github]提交你的需求。可是请记住,除了一些琐碎的问题,咱们但愿将问题的讨论记录在问题追踪中,以备未来做参考。
For more details see the guidelines at the
https://github.com/spring-pro...[CONTRIBUTING],
top-level project page.
有关更多的详细信息,请参考顶级项目页面的指南 https://github.com/spring-pro...[CONTRIBUTING]。
If you are just getting started with Spring, you may want to begin using the Spring
Framework by creating a https://projects.spring.io/sp...[Spring Boot]-based
application. Spring Boot provides a quick (and opinionated) way to create a
production-ready Spring-based application. It is based on the Spring Framework, favors
convention over configuration, and is designed to get you up and running as quickly
as possible.
若是你刚刚开始使用Spring,你可能须要使用基于 https://projects.spring.io/sp...[Spring Boot]来建立一个Spring项目。Spring Boot提供了一个快速(且便捷)的方式来构建一个基于Spring的生产应用。它基于Spring框架而且旨在让你可以快速上手运行一个项目,更倾向于约定优于配置。
You can use https://start.spring.io/[start.spring.io] to generate a basic project or follow
one of the https://spring.io/guides["Getting Started" guides], such as
https://spring.io/guides/gs/r...[Getting Started Building a RESTful Web Service].
As well as being easier to digest, these guides are very task focused, and most of them
are based on Spring Boot. They also cover other projects from the Spring portfolio that
you might want to consider when solving a particular problem.
你可使用 https://start.spring.io/[start.spring.io] 生成一个基础项目工程或者根据如下指南 https://spring.io/guides["Getting Started" guides]操做,好比: https://spring.io/guides/gs/r...[Getting Started Building a RESTful Web Service]。这些指南大多数是基于Spring Boot开发的,很是注重操做而且易于上手。他们还包含了Spring工程系列中的其余项目,你在解决问题可能须要考虑到他们。
本文由博客一文多发平台 OpenWrite 发布!