Skip to content

Commit 78f9afb

Browse files
snicollPhillip Webb
authored andcommitted
Review first 8 parts of the doc
This commit mostly fixes typos but also improves slightly specific areas, adding links when it make sense.
1 parent 0f8d00b commit 78f9afb

File tree

7 files changed

+50
-44
lines changed

7 files changed

+50
-44
lines changed

spring-boot-docs/src/main/asciidoc/build-tool-plugins.adoc

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[partintro]
55
--
66
Spring Boot provides build tool plugins for Maven and Gradle. The plugins offer a
7-
variety of features, including the packaging of executable jars. The section provides
7+
variety of features, including the packaging of executable jars. This section provides
88
more details on both plugins, as well as some help should you need to extend an
99
unsupported build system. If you are just getting started, you might want to read
1010
``<<using-spring-boot.adoc#using-boot-build-systems>>'' from the
@@ -155,9 +155,11 @@ The following configuration options are available for the `spring-boot:repackage
155155
|Name |Description
156156

157157
|`classifier`
158-
|Classifier to add to the artifact generated. If given, the artifact will be attached. If
158+
|Classifier to add to the generated artifact. If given, the artifact will be attached. If
159159
this is not given, it will merely be written to the output directory according to the
160-
`finalName`.
160+
`finalName`. Attaching the artifact allows to deploy it alongside to the original one,
161+
see http://maven.apache.org/plugins/maven-deploy-plugin/examples/deploying-with-classifiers.html[
162+
the maven documentation for more details]
161163

162164
|`mainClass`
163165
|The name of the main class. If not specified will search for a single compiled class
@@ -362,7 +364,7 @@ default) reloadable in the live application, which can be helpful at development
362364
[[build-tool-plugins-gradle-repackage-configuration]]
363365
=== Repackage configuration
364366
The gradle plugin automatically extends your build script DSL with a `springBoot` element
365-
for configuration. Simply set the appropriate properties as you would any other Gradle
367+
for configuration. Simply set the appropriate properties as you would with any other Gradle
366368
extension (see below for a list of configuration options):
367369

368370
[source,groovy,indent=0,subs="verbatim,attributes"]
@@ -379,7 +381,7 @@ extension (see below for a list of configuration options):
379381
Sometimes it may be more appropriate to not package default dependencies resolved from
380382
`compile`, `runtime` and `provided` scopes. If the created executable jar file
381383
is intended to be run as it is, you need to have all dependencies nested inside it;
382-
however, if the plan is to explode a jar file and run main class manually, you may already
384+
however, if the plan is to explode a jar file and run the main class manually, you may already
383385
have some of the libraries available via `CLASSPATH`. This is a situation where
384386
you can repackage your jar with a different set of dependencies.
385387

spring-boot-docs/src/main/asciidoc/cloud-deployment.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ information is exposed to the application as environment variables (for example:
102102
environment variables are language agnostic.
103103

104104
Environment variables don't always make for the easiest API so Spring Boot automatically
105-
extracts then and flattens the data into properties that can be accessed through
105+
extracts them and flattens the data into properties that can be accessed through
106106
Spring's `Environment` abstraction:
107107

108108
[source,java,indent=0]
@@ -232,7 +232,7 @@ that covers the steps that you need to follow when deploying to CloudBees.
232232
== What to read next
233233
Check out the http://www.cloudfoundry.com/[Cloud Foundry], https://www.heroku.com/[Heroku]
234234
and http://www.cloudbees.com[CloudBees] web sites for more information about the kinds of
235-
features that a PaaS can offer. These are just three of the more popular Java PaaS
235+
features that a PaaS can offer. These are just three of the most popular Java PaaS
236236
providers, since Spring Boot is so amenable to cloud-based deployment you free to
237237
consider other providers as well.
238238

spring-boot-docs/src/main/asciidoc/getting-started.adoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -469,8 +469,8 @@ that provides useful Maven defaults. It also provides a `dependency-management`
469469
so that you can omit `version` tags for ``blessed'' dependencies.
470470

471471
Other ``Starter POMs'' simply provide dependencies that you are likely to need when
472-
developing a specific type of application. Since we are developing web application we will
473-
add a `spring-boot-starter-web` dependency -- but before that, lets look at what we
472+
developing a specific type of application. Since we are developing a web application, we
473+
will add a `spring-boot-starter-web` dependency -- but before that, lets look at what we
474474
currently have.
475475

476476
[indent=0]
@@ -486,7 +486,7 @@ currently have.
486486
----
487487

488488
The `mvn dependency:tree` command prints tree representation of your project dependencies.
489-
You can see that `spring-boot-starter-parent` has already provides some useful test
489+
You can see that `spring-boot-starter-parent` has already provided some useful test
490490
dependencies. Lets edit our `pom.xml` and add the `spring-boot-starter-web` dependency
491491
just below the `parent` section:
492492

@@ -508,8 +508,8 @@ additional dependencies, including the Tomcat web server and Spring Boot itself.
508508
[[getting-started-first-application-code]]
509509
=== Writing the code
510510
To finish our application we need to create a single Java file. Maven will compile sources
511-
from `src/main/java` so you need to create that folder structure, then add a file named
512-
`src/main/java/Example.java`:
511+
from `src/main/java` by default so you need to create that folder structure, then add a
512+
file named `src/main/java/Example.java`:
513513

514514
[source,java,indent=0]
515515
----

spring-boot-docs/src/main/asciidoc/index.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Phillip Webb; Dave Syer; Josh Long;
2323
:dc-spring-boot-autoconfigure: {dc-root}/org/springframework/boot/autoconfigure
2424
:dc-spring-boot-actuator: {dc-root}/org/springframework/boot/actuate
2525
:spring-reference: http://docs.spring.io/spring/docs/current/spring-framework-reference/htmlsingle
26+
:spring-javadoc: http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework
2627
:spring-data-javadoc: http://docs.spring.io/spring-data/jpa/docs/current/api/org/springframework/data/jpa
2728
:spring-data-commons-javadoc: http://docs.spring.io/spring-data/commons/docs/current/api/org/springframework/data
2829
:spring-data-mongo-javadoc: http://docs.spring.io/spring-data/mongodb/docs/current/api/org/springframework/data/mongodb

spring-boot-docs/src/main/asciidoc/production-ready-features.adoc

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ Auditing, health and metrics gathering can be automatically applied to your appl
1313

1414
[[production-ready-enabling]]
1515
== Enabling production-ready features.
16-
The `spring-boot-actuator` project provides all of Spring Boot's production-ready
17-
features. The simplist way to enable the features is to add a dependency to the
16+
The `spring-boot-actuator` module provides all of Spring Boot's production-ready
17+
features. The simplest way to enable the features is to add a dependency to the
1818
`spring-boot-starter-actuator` ``Starter POM''.
1919

2020
.Definition of Actuator
@@ -170,7 +170,7 @@ implementation that attempts a simple database test.
170170

171171
[[production-ready-application-info]]
172172
=== Custom application info information
173-
You can customize the data exposed by the `info` endpoint by settings `info.*` Spring
173+
You can customize the data exposed by the `info` endpoint by setting `info.*` Spring
174174
properties. All `Environment` properties under the info key will be automatically
175175
exposed. For example, you could add the following to your `application.properties`:
176176

@@ -244,7 +244,7 @@ for Gradle users, although a little more work is required to generate the proper
244244
[[production-ready-monitoring]]
245245
== Monitoring and management over HTTP
246246
If you are developing a Spring MVC application, Spring Boot Actuator will auto-configure
247-
all non-sensitive endpoints to be exposed over HTTP. The default convention it to use the
247+
all non-sensitive endpoints to be exposed over HTTP. The default convention is to use the
248248
`id` of the endpoint as the URL path. For example, `health` is exposed as `/health`.
249249

250250

@@ -381,7 +381,7 @@ property to `false`:
381381
=== Using Jolokia for JMX over HTTP
382382
Jolokia is a JMX-HTTP bridge giving an alternative method of accessing JMX beans. To
383383
use Jolokia, simply include a dependency to `org.jolokia:jolokia-core`. For example,
384-
using Maven you you add the following:
384+
using Maven you would add the following:
385385

386386
[source,xml,indent=0]
387387
----
@@ -415,7 +415,7 @@ If you are using Jolokia but you don't want Spring Boot to configure it, simply
415415

416416
[source,properties,indent=0]
417417
----
418-
jolokia.config.enabled=false
418+
endpoints.jolokia.enabled=false
419419
----
420420

421421

@@ -511,7 +511,8 @@ Here is a simple ``hello world'' command that could be loaded from
511511
----
512512
package commands
513513
514-
import org.springframework.boot.actuate.endpoint.BeansEndpoint
514+
import org.crsh.cli.Usage
515+
import org.crsh.cli.Command
515516
516517
class hello {
517518
@@ -621,7 +622,7 @@ Here is a simple example that counts the number of times that a method is invoke
621622
}
622623
----
623624

624-
TIP: You can use any string as a metric name but you following guidelines of your chosen
625+
TIP: You can use any string as a metric name but you should follow guidelines of your chosen
625626
store/graphing technology. Some good guidelines for Graphite are available on
626627
http://matt.aimonetti.net/posts/2013/06/26/practical-guide-to-graphite-monitoring/[Matt Aimonetti's Blog].
627628

@@ -678,7 +679,7 @@ use that directly, or you can simply publish `AuditApplicationEvent` via the Spr
678679

679680
[[production-ready-tracing]]
680681
== Tracing
681-
Tracing is automatically enable for all HTTP requests. You can view the `trace` endpoint
682+
Tracing is automatically enabled for all HTTP requests. You can view the `trace` endpoint
682683
and obtain basic information about the last few requests:
683684

684685
[source,json,indent=0]

spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ the static `SpringApplication.run` method:
2525
}
2626
----
2727

28-
When you application starts you should see something similar to the following:
28+
When your application starts you should see something similar to the following:
2929

3030
[indent=0,subs="attributes"]
3131
----
@@ -43,7 +43,7 @@ When you application starts you should see something similar to the following:
4343
2014-03-04 13:09:56.501 INFO 41370 --- [ main] o.s.b.s.app.SampleApplication : Started SampleApplication in 2.992 seconds (JVM running for 3.658)
4444
----
4545

46-
By default `INFO` logging messages will shown, including some relevant startup details
46+
By default `INFO` logging messages will be shown, including some relevant startup details
4747
such as the user that launched the application.
4848

4949

@@ -103,8 +103,9 @@ context, otherwise there is no way for Spring Boot to create the `ServletContext
103103

104104
[[boot-features-application-events-and-listeners]]
105105
=== Application events and listeners
106-
In addition to the usual Spring Framework events, such as `ContextRefreshedEvent`, a
107-
`SpringApplication` sends some additional application events. Some events are actually
106+
In addition to the usual Spring Framework events, such as
107+
{spring-javadoc}/context/event/ContextRefreshedEvent.{dc-ext}[`ContextRefreshedEvent`],
108+
a `SpringApplication` sends some additional application events. Some events are actually
108109
triggered before the `ApplicationContext` is created.
109110

110111
You can register event listeners in a number of ways, the most common being
@@ -139,7 +140,7 @@ you need to override the default.
139140
It is also possible to take complete control of the `ApplicationContext` type that will
140141
be used by calling `setApplicationContextClass(...)`.
141142

142-
TIP: It is often desirable call `setWebEnvironment(false)` when using `SpringApplication`
143+
TIP: It is often desirable to call `setWebEnvironment(false)` when using `SpringApplication`
143144
within a JUnit test.
144145

145146

@@ -255,7 +256,8 @@ following locations and add them to the Spring `Environment`:
255256

256257
The list is ordered by precedence (locations higher in the list override lower items).
257258

258-
NOTE: You can also use YAML ('.yml') files as an alternative to '.properties' (see below)
259+
NOTE: You can also <<boot-features-external-config-yaml, use YAML ('.yml') files>> as
260+
an alternative to '.properties'.
259261

260262
If you don't like `application.properties` as the configuration file name you can switch
261263
to another by specifying a `spring.config.name` environment property. You can also refer
@@ -596,7 +598,7 @@ Logback routing is also included to ensure that dependent libraries that use
596598
Java Util Logging, Commons Logging, Log4J or SLF4J will all work correctly.
597599

598600
TIP: There are a lot of logging frameworks available for Java. Don't worry if the above
599-
list seems confusing, generally you won't need to change your logging dependencues and
601+
list seems confusing, generally you won't need to change your logging dependencies and
600602
the Spring Boot defaults will work just fine.
601603

602604

@@ -966,9 +968,9 @@ you can see how to set things up.
966968
[[boot-features-sql]]
967969
== Working with SQL databases
968970
The Spring Framework provides extensive support for working with SQL databases. From
969-
direct JDBC access using `JdbcTemplate` though to complete ``object relational mapping''
971+
direct JDBC access using `JdbcTemplate` to complete ``object relational mapping''
970972
technologies such as Hibernate. Spring Data provides an additional level of functionality,
971-
creating `Repoistory` implementations directly from interfaces and using conventions to
973+
creating `Repository` implementations directly from interfaces and using conventions to
972974
generate queries from your method names.
973975

974976

@@ -983,7 +985,7 @@ credentials to establish a database connection.
983985

984986
[[boot-features-embedded-database-support]]
985987
==== Embedded Database Support
986-
It's often convenient develop applications using an in-memory embedded database.
988+
It's often convenient to develop applications using an in-memory embedded database.
987989
Obviously, in-memory databases do not provide persistent storage; you will need to
988990
populate your database when your application starts and be prepared to throw away
989991
data when your application ends.
@@ -1161,7 +1163,7 @@ how-to.
11611163
[[boot-features-spring-data-jpa-repositories]]
11621164
==== Spring Data JPA Repositories
11631165
Spring Data JPA repositories are interfaces that you can define to access data. JPA
1164-
queries are created automatically from your method names. For example, a `CityRepoistory`
1166+
queries are created automatically from your method names. For example, a `CityRepository`
11651167
interface might declare a `findAllByState(String state)` method to find all cities
11661168
in a given state.
11671169

@@ -1222,7 +1224,7 @@ http://projects.spring.io/spring-data-gemfire/[Gemfire],
12221224
http://projects.spring.io/spring-data-couchbase/[Couchbase] and
12231225
http://projects.spring.io/spring-data-cassandra/[Cassandra].
12241226
Spring Boot provides auto-configuration for MongoDB; you can make use of the other
1225-
project, but you will need to configure them yourself. Refer to the appropriate
1227+
projects, but you will need to configure them yourself. Refer to the appropriate
12261228
reference documentation at http://projects.spring.io/spring-data.
12271229

12281230

@@ -1316,7 +1318,7 @@ See the `MongoOperations` Javadoc for complete details.
13161318
[[boot-features-spring-data-mongo-repositories]]
13171319
==== Spring Data MongoDB repositories
13181320
Spring Data includes repository support for MongoDB. As with the JPA repositories
1319-
discussed earlier, the basic principal is that queries are constructed for you
1321+
discussed earlier, the basic principle is that queries are constructed for you
13201322
automatically based on method names.
13211323

13221324
In fact, both Spring Data JPA and Spring Data MongoDB share the same common
@@ -1439,7 +1441,7 @@ useful when testing your application.
14391441
==== ConfigFileApplicationContextInitializer
14401442
`ConfigFileApplicationContextInitializer` is an `ApplicationContextInitializer` that
14411443
can apply to your tests to load Spring Boot `application.properties` files. You can use
1442-
when you don't need the full features provided by `@SpringApplicationConfiguration`.
1444+
this when you don't need the full features provided by `@SpringApplicationConfiguration`.
14431445

14441446
[source,java,indent=0]
14451447
----
@@ -1572,15 +1574,15 @@ when searching for beans.
15721574
NOTE: `@Conditional` annotations are processed when `@Configuration` classes are
15731575
parsed. Auto-configure `@Configuration` is always parsed last (after any user defined
15741576
beans), however, if you are using these annotations on regular `@Configuration` classes,
1575-
care must be take not to refer to bean definitions that have not yet been created.
1577+
care must be taken not to refer to bean definitions that have not yet been created.
15761578

15771579

15781580

15791581
[[boot-features-resource-conditions]]
15801582
==== Resource conditions
1581-
The `@ConditionalOnResource` annotation allows configuration to be skipped when a specific
1582-
resource is not present. Resources can be specified using the usual Spring conventions,
1583-
for example, `file:/home/user/test.dat`.
1583+
The `@ConditionalOnResource` annotation allows configuration to be included only when a
1584+
specific resource is present. Resources can be specified using the usual Spring
1585+
conventions, for example, `file:/home/user/test.dat`.
15841586

15851587

15861588

spring-boot-docs/src/main/asciidoc/using-spring-boot.adoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ want to change the settings defined in the parent.
131131
[[using-boot-gradle]]
132132
=== Gradle
133133
Gradle users can directly import ``starter POMs'' in their `dependencies` section. Unlike
134-
Maven, there is no ``super parent'' to import.
134+
Maven, there is no ``super parent'' to import to share some configuration.
135135

136136
[source,groovy,indent=0,subs="attributes"]
137137
----
@@ -284,7 +284,7 @@ swap specific technical facets.
284284
|Imports the Jetty HTTP engine (to be used as an alternative to Tomcat)
285285

286286
|`spring-boot-starter-log4j`
287-
|Support the Log4J looggin framework
287+
|Support the Log4J logging framework
288288

289289
|`spring-boot-starter-logging`
290290
|Import Spring Boot's default logging framework (Logback).
@@ -310,7 +310,7 @@ should be avoided. It can cause particular problems for Spring Boot applications
310310
use `@ComponentScan` or `@EntityScan` annotations, since every class from every jar,
311311
will be read.
312312

313-
TIP: We recommend that you use the follow Java's recommended package naming conventions
313+
TIP: We recommend that you follow Java's recommended package naming conventions
314314
and use a reversed domain name (for example, `com.example.project`).
315315

316316

@@ -450,13 +450,13 @@ you can use the exclude attribute of `@EnableAutoConfiguration` to disable them.
450450

451451
[[using-boot-spring-beans-and-dependency-injection]]
452452
== Spring Beans and dependency injection
453-
You are free to use any the standard Spring Framework techniques to defines your beans
453+
You are free to use any of the standard Spring Framework techniques to define your beans
454454
and their injected dependencies. For simplicity, we often find that using `@ComponentScan`
455455
to find your beans, in combination with `@Autowired` constructor injection works well.
456456

457457
If you structure your code as suggested above (locating your application class in a root
458458
package), you can add `@ComponentScan` without any arguments. All of your application
459-
components (`@Component`, `@Service`, `@Repoistory`, `@Controller` etc.) will be
459+
components (`@Component`, `@Service`, `@Repository`, `@Controller` etc.) will be
460460
automatically registered as Spring Beans.
461461

462462
Here is an example `@Service` Bean that uses constructor injection to obtain a

0 commit comments

Comments
 (0)