mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-07-05 00:56:58 +08:00
Polish asciidoc formatting
This commit is contained in:
parent
f396c51550
commit
4849f8f273
|
@ -5,12 +5,14 @@ Spring Boot is released under the Apache 2.0 license. If you would like to contr
|
||||||
|
|
||||||
|
|
||||||
== Code of Conduct
|
== Code of Conduct
|
||||||
|
|
||||||
This project adheres to the Contributor Covenant link:CODE_OF_CONDUCT.adoc[code of conduct].
|
This project adheres to the Contributor Covenant link:CODE_OF_CONDUCT.adoc[code of conduct].
|
||||||
By participating, you are expected to uphold this code. Please report unacceptable behavior to code-of-conduct@spring.io.
|
By participating, you are expected to uphold this code. Please report unacceptable behavior to code-of-conduct@spring.io.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
== Using GitHub Issues
|
== Using GitHub Issues
|
||||||
|
|
||||||
We use GitHub issues to track bugs and enhancements.
|
We use GitHub issues to track bugs and enhancements.
|
||||||
If you have a general usage question please ask on https://stackoverflow.com[Stack Overflow].
|
If you have a general usage question please ask on https://stackoverflow.com[Stack Overflow].
|
||||||
The Spring Boot team and the broader community monitor the https://stackoverflow.com/tags/spring-boot[`spring-boot`] tag.
|
The Spring Boot team and the broader community monitor the https://stackoverflow.com/tags/spring-boot[`spring-boot`] tag.
|
||||||
|
@ -21,12 +23,14 @@ Ideally, that would include a small sample project that reproduces the problem.
|
||||||
|
|
||||||
|
|
||||||
== Reporting Security Vulnerabilities
|
== Reporting Security Vulnerabilities
|
||||||
|
|
||||||
If you think you have found a security vulnerability in Spring Boot please *DO NOT* disclose it publicly until we've had a chance to fix it.
|
If you think you have found a security vulnerability in Spring Boot please *DO NOT* disclose it publicly until we've had a chance to fix it.
|
||||||
Please don't report security vulnerabilities using GitHub issues, instead head over to https://spring.io/security-policy and learn how to disclose them responsibly.
|
Please don't report security vulnerabilities using GitHub issues, instead head over to https://spring.io/security-policy and learn how to disclose them responsibly.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
== Sign the Contributor License Agreement
|
== Sign the Contributor License Agreement
|
||||||
|
|
||||||
Before we accept a non-trivial patch or pull request we will need you to https://cla.pivotal.io/sign/spring[sign the Contributor License Agreement].
|
Before we accept a non-trivial patch or pull request we will need you to https://cla.pivotal.io/sign/spring[sign the Contributor License Agreement].
|
||||||
Signing the contributor's agreement does not grant anyone commit rights to the main repository, but it does mean that we can accept your contributions, and you will get an author credit if we do.
|
Signing the contributor's agreement does not grant anyone commit rights to the main repository, but it does mean that we can accept your contributions, and you will get an author credit if we do.
|
||||||
Active contributors might be asked to join the core team, and given the ability to merge pull requests.
|
Active contributors might be asked to join the core team, and given the ability to merge pull requests.
|
||||||
|
@ -34,6 +38,7 @@ Active contributors might be asked to join the core team, and given the ability
|
||||||
|
|
||||||
|
|
||||||
== Code Conventions and Housekeeping
|
== Code Conventions and Housekeeping
|
||||||
|
|
||||||
None of these is essential for a pull request, but they will all help. They can also be
|
None of these is essential for a pull request, but they will all help. They can also be
|
||||||
added after the original pull request but before a merge.
|
added after the original pull request but before a merge.
|
||||||
|
|
||||||
|
@ -55,4 +60,5 @@ added after the original pull request but before a merge.
|
||||||
|
|
||||||
|
|
||||||
== Working with the Code
|
== Working with the Code
|
||||||
|
|
||||||
For information on editing, building, and testing the code, see the https://github.com/spring-projects/spring-boot/wiki/Working-with-the-Code[Working with the Code] page on the project wiki.
|
For information on editing, building, and testing the code, see the https://github.com/spring-projects/spring-boot/wiki/Working-with-the-Code[Working with the Code] page on the project wiki.
|
||||||
|
|
56
README.adoc
56
README.adoc
|
@ -19,35 +19,37 @@ Our primary goals are:
|
||||||
|
|
||||||
|
|
||||||
== Installation and Getting Started
|
== Installation and Getting Started
|
||||||
|
|
||||||
The {docs}/html/[reference documentation] includes detailed {docs}/html/getting-started.html#getting-started-installing-spring-boot[installation instructions] as well as a comprehensive {docs}/html/getting-started.html#getting-started-first-application[``getting started``] guide.
|
The {docs}/html/[reference documentation] includes detailed {docs}/html/getting-started.html#getting-started-installing-spring-boot[installation instructions] as well as a comprehensive {docs}/html/getting-started.html#getting-started-first-application[``getting started``] guide.
|
||||||
|
|
||||||
Here is a quick teaser of a complete Spring Boot application in Java:
|
Here is a quick teaser of a complete Spring Boot application in Java:
|
||||||
|
|
||||||
[source,java,indent=0]
|
[source,java]
|
||||||
----
|
----
|
||||||
import org.springframework.boot.*;
|
import org.springframework.boot.*;
|
||||||
import org.springframework.boot.autoconfigure.*;
|
import org.springframework.boot.autoconfigure.*;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
public class Example {
|
public class Example {
|
||||||
|
|
||||||
@RequestMapping("/")
|
|
||||||
String home() {
|
|
||||||
return "Hello World!";
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void main(String[] args) {
|
|
||||||
SpringApplication.run(Example.class, args);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
@RequestMapping("/")
|
||||||
|
String home() {
|
||||||
|
return "Hello World!";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
SpringApplication.run(Example.class, args);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
----
|
----
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
== Getting Help
|
== Getting Help
|
||||||
|
|
||||||
Are you having trouble with Spring Boot? We want to help!
|
Are you having trouble with Spring Boot? We want to help!
|
||||||
|
|
||||||
* Check the {docs}/html/[reference documentation], especially the {docs}/html/howto.html#howto[How-to's] -- they provide solutions to the most common questions.
|
* Check the {docs}/html/[reference documentation], especially the {docs}/html/howto.html#howto[How-to's] -- they provide solutions to the most common questions.
|
||||||
|
@ -61,6 +63,7 @@ Are you having trouble with Spring Boot? We want to help!
|
||||||
|
|
||||||
|
|
||||||
== Reporting Issues
|
== Reporting Issues
|
||||||
|
|
||||||
Spring Boot uses GitHub's integrated issue tracking system to record bugs and feature requests.
|
Spring Boot uses GitHub's integrated issue tracking system to record bugs and feature requests.
|
||||||
If you want to raise an issue, please follow the recommendations below:
|
If you want to raise an issue, please follow the recommendations below:
|
||||||
|
|
||||||
|
@ -75,31 +78,34 @@ We like to know the Spring Boot version, operating system, and JVM version you'r
|
||||||
|
|
||||||
|
|
||||||
== Building from Source
|
== Building from Source
|
||||||
|
|
||||||
You don't need to build from source to use Spring Boot (binaries in https://repo.spring.io[repo.spring.io]), but if you want to try out the latest and greatest, Spring Boot can be built and published to your local Maven cache using the https://docs.gradle.org/current/userguide/gradle_wrapper.html[Gradle wrapper].
|
You don't need to build from source to use Spring Boot (binaries in https://repo.spring.io[repo.spring.io]), but if you want to try out the latest and greatest, Spring Boot can be built and published to your local Maven cache using the https://docs.gradle.org/current/userguide/gradle_wrapper.html[Gradle wrapper].
|
||||||
You also need JDK 17.
|
You also need JDK 17.
|
||||||
|
|
||||||
[indent=0]
|
[source,shell]
|
||||||
----
|
----
|
||||||
$ ./gradlew publishToMavenLocal
|
$ ./gradlew publishToMavenLocal
|
||||||
----
|
----
|
||||||
|
|
||||||
This will build all of the jars and documentation and publish them to your local Maven cache.
|
This will build all of the jars and documentation and publish them to your local Maven cache.
|
||||||
It won't run any of the tests.
|
It won't run any of the tests.
|
||||||
If you want to build everything, use the `build` task:
|
If you want to build everything, use the `build` task:
|
||||||
|
|
||||||
[indent=0]
|
[source,shell]
|
||||||
----
|
----
|
||||||
$ ./gradlew build
|
$ ./gradlew build
|
||||||
----
|
----
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
== Modules
|
== Modules
|
||||||
|
|
||||||
There are several modules in Spring Boot. Here is a quick overview:
|
There are several modules in Spring Boot. Here is a quick overview:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
=== spring-boot
|
=== spring-boot
|
||||||
|
|
||||||
The main library providing features that support the other parts of Spring Boot. These include:
|
The main library providing features that support the other parts of Spring Boot. These include:
|
||||||
|
|
||||||
* The `SpringApplication` class, providing static convenience methods that can be used to write a stand-alone Spring Application.
|
* The `SpringApplication` class, providing static convenience methods that can be used to write a stand-alone Spring Application.
|
||||||
|
@ -111,6 +117,7 @@ The main library providing features that support the other parts of Spring Boot.
|
||||||
|
|
||||||
|
|
||||||
=== spring-boot-autoconfigure
|
=== spring-boot-autoconfigure
|
||||||
|
|
||||||
Spring Boot can configure large parts of typical applications based on the content of their classpath.
|
Spring Boot can configure large parts of typical applications based on the content of their classpath.
|
||||||
A single `@EnableAutoConfiguration` annotation triggers auto-configuration of the Spring context.
|
A single `@EnableAutoConfiguration` annotation triggers auto-configuration of the Spring context.
|
||||||
|
|
||||||
|
@ -120,6 +127,7 @@ Auto-configuration will always back away as the user starts to define their own
|
||||||
|
|
||||||
|
|
||||||
=== spring-boot-starters
|
=== spring-boot-starters
|
||||||
|
|
||||||
Starters are a set of convenient dependency descriptors that you can include in your application.
|
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 you need without having to hunt through sample code and copy-paste loads of dependency descriptors.
|
You get a one-stop shop for all the Spring and related technology 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, include the `spring-boot-starter-data-jpa` dependency in your project, and you are good to go.
|
For example, if you want to get started using Spring and JPA for database access, include the `spring-boot-starter-data-jpa` dependency in your project, and you are good to go.
|
||||||
|
@ -127,6 +135,7 @@ For example, if you want to get started using Spring and JPA for database access
|
||||||
|
|
||||||
|
|
||||||
=== spring-boot-actuator
|
=== spring-boot-actuator
|
||||||
|
|
||||||
Actuator endpoints let you monitor and interact with your application.
|
Actuator endpoints let you monitor and interact with your application.
|
||||||
Spring Boot Actuator provides the infrastructure required for actuator endpoints.
|
Spring Boot Actuator provides the infrastructure required for actuator endpoints.
|
||||||
It contains annotation support for actuator endpoints.
|
It contains annotation support for actuator endpoints.
|
||||||
|
@ -135,6 +144,7 @@ This module provides many endpoints, including the `HealthEndpoint`, `Environmen
|
||||||
|
|
||||||
|
|
||||||
=== spring-boot-actuator-autoconfigure
|
=== spring-boot-actuator-autoconfigure
|
||||||
|
|
||||||
This provides auto-configuration for actuator endpoints based on the content of the classpath and a set of properties.
|
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`.
|
For instance, if Micrometer is on the classpath, it will auto-configure the `MetricsEndpoint`.
|
||||||
It contains configuration to expose endpoints over HTTP or JMX.
|
It contains configuration to expose endpoints over HTTP or JMX.
|
||||||
|
@ -143,29 +153,34 @@ Just like Spring Boot AutoConfigure, this will back away as the user starts to d
|
||||||
|
|
||||||
|
|
||||||
=== spring-boot-test
|
=== spring-boot-test
|
||||||
|
|
||||||
This module contains core items and annotations that can be helpful when testing your application.
|
This module contains core items and annotations that can be helpful when testing your application.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
=== spring-boot-test-autoconfigure
|
=== spring-boot-test-autoconfigure
|
||||||
|
|
||||||
Like other Spring Boot auto-configuration modules, spring-boot-test-autoconfigure provides auto-configuration for tests based on the classpath.
|
Like other Spring Boot auto-configuration modules, spring-boot-test-autoconfigure provides auto-configuration for tests based on the classpath.
|
||||||
It includes many annotations that can automatically configure a slice of your application that needs to be tested.
|
It includes many annotations that can automatically configure a slice of your application that needs to be tested.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
=== spring-boot-loader
|
=== 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`.
|
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 work with the link:spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin[Gradle] or link:spring-boot-project/spring-boot-tools/spring-boot-maven-plugin[Maven] plugin instead.
|
Generally, you will not need to use `spring-boot-loader` directly but work with the link:spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin[Gradle] or link:spring-boot-project/spring-boot-tools/spring-boot-maven-plugin[Maven] plugin instead.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
=== spring-boot-devtools
|
=== spring-boot-devtools
|
||||||
|
|
||||||
The spring-boot-devtools module provides additional development-time features, such as automatic restarts, for a smoother application development experience.
|
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.
|
Developer tools are automatically disabled when running a fully packaged application.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
== Guides
|
== Guides
|
||||||
|
|
||||||
The https://spring.io/[spring.io] site contains several guides that show how to use Spring Boot step-by-step:
|
The https://spring.io/[spring.io] site contains several guides that show how to use Spring Boot step-by-step:
|
||||||
|
|
||||||
* https://spring.io/guides/gs/spring-boot/[Building an Application with Spring Boot] is an introductory guide that shows you how to create an application, run it, and add some management services.
|
* https://spring.io/guides/gs/spring-boot/[Building an Application with Spring Boot] is an introductory guide that shows you how to create an application, run it, and add some management services.
|
||||||
|
@ -175,4 +190,5 @@ The https://spring.io/[spring.io] site contains several guides that show how to
|
||||||
|
|
||||||
|
|
||||||
== License
|
== License
|
||||||
|
|
||||||
Spring Boot is Open Source software released under the https://www.apache.org/licenses/LICENSE-2.0.html[Apache 2.0 license].
|
Spring Boot is Open Source software released under the https://www.apache.org/licenses/LICENSE-2.0.html[Apache 2.0 license].
|
||||||
|
|
12
SUPPORT.adoc
12
SUPPORT.adoc
|
@ -1,6 +1,9 @@
|
||||||
= Getting support for Spring Boot
|
= Getting support for Spring Boot
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
== GitHub issues
|
== GitHub issues
|
||||||
|
|
||||||
We choose not to use GitHub issues for general usage questions and support, preferring to
|
We choose not to use GitHub issues for general usage questions and support, preferring to
|
||||||
use issues solely for the tracking of bugs and enhancements. If you have a general
|
use issues solely for the tracking of bugs and enhancements. If you have a general
|
||||||
usage question please do not open a GitHub issue, but use one of the other channels
|
usage question please do not open a GitHub issue, but use one of the other channels
|
||||||
|
@ -10,17 +13,26 @@ If you are reporting a bug, please help to speed up problem diagnosis by providi
|
||||||
much information as possible. Ideally, that would include a small sample project that
|
much information as possible. Ideally, that would include a small sample project that
|
||||||
reproduces the problem.
|
reproduces the problem.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
== Stack Overflow
|
== Stack Overflow
|
||||||
|
|
||||||
The Spring Boot community monitors the
|
The Spring Boot community monitors the
|
||||||
https://stackoverflow.com/tags/spring-boot[`spring-boot`] tag on Stack Overflow. Before
|
https://stackoverflow.com/tags/spring-boot[`spring-boot`] tag on Stack Overflow. Before
|
||||||
asking a question, please familiarize yourself with Stack Overflow's
|
asking a question, please familiarize yourself with Stack Overflow's
|
||||||
https://stackoverflow.com/help/how-to-ask[advice on how to ask a good question].
|
https://stackoverflow.com/help/how-to-ask[advice on how to ask a good question].
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
== Gitter
|
== Gitter
|
||||||
|
|
||||||
If you want to discuss something or have a question that isn't suited to Stack Overflow,
|
If you want to discuss something or have a question that isn't suited to Stack Overflow,
|
||||||
the Spring Boot community chat in the
|
the Spring Boot community chat in the
|
||||||
https://gitter.im/spring-projects/spring-boot[#spring-boot room on Gitter].
|
https://gitter.im/spring-projects/spring-boot[#spring-boot room on Gitter].
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
== VMware Open Source Software Support
|
== VMware Open Source Software Support
|
||||||
|
|
||||||
If you are interested in more dedicated support, VMware provides
|
If you are interested in more dedicated support, VMware provides
|
||||||
https://spring.io/support[premium support] for Spring Boot.
|
https://spring.io/support[premium support] for Spring Boot.
|
||||||
|
|
|
@ -7,31 +7,37 @@ gathering can be automatically applied to your application. The
|
||||||
https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#production-ready[user guide]
|
https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#production-ready[user guide]
|
||||||
covers the features in more detail.
|
covers the features in more detail.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
== Enabling the Actuator
|
== Enabling the Actuator
|
||||||
|
|
||||||
The recommended way to enable the features is to add a dependency to the
|
The recommended way to enable the features is to add a dependency to the
|
||||||
`spring-boot-starter-actuator` '`Starter`'. To add the actuator to a Maven-based project,
|
`spring-boot-starter-actuator` '`Starter`'. To add the actuator to a Maven-based project,
|
||||||
add the following '`Starter`' dependency:
|
add the following '`Starter`' dependency:
|
||||||
|
|
||||||
[source,xml,indent=0]
|
[source,xml]
|
||||||
----
|
----
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
----
|
----
|
||||||
|
|
||||||
For Gradle, use the following declaration:
|
For Gradle, use the following declaration:
|
||||||
|
|
||||||
[indent=0]
|
[source]
|
||||||
----
|
----
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'org.springframework.boot:spring-boot-starter-actuator'
|
implementation 'org.springframework.boot:spring-boot-starter-actuator'
|
||||||
}
|
}
|
||||||
----
|
----
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
== Features
|
== Features
|
||||||
|
|
||||||
* **Endpoints** Actuator endpoints allow you to monitor and interact with your
|
* **Endpoints** Actuator endpoints allow you to monitor and interact with your
|
||||||
application. Spring Boot includes a number of built-in endpoints and you can also add
|
application. Spring Boot includes a number of built-in endpoints and you can also add
|
||||||
your own. For example the `health` endpoint provides basic application health
|
your own. For example the `health` endpoint provides basic application health
|
||||||
|
|
|
@ -11,6 +11,7 @@ For complete details see the
|
||||||
https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#using-boot-starter[reference documentation]
|
https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#using-boot-starter[reference documentation]
|
||||||
|
|
||||||
== Community Contributions
|
== Community Contributions
|
||||||
|
|
||||||
If you create a starter for a technology that is not already in the standard list we can
|
If you create a starter for a technology that is not already in the standard list we can
|
||||||
list it here. To ask us to do so, please open a pull request that updates this page.
|
list it here. To ask us to do so, please open a pull request that updates this page.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user