Skip to content

Commit a3eeda9

Browse files
committed
Consistent separation between chapters and after chapter titles
1 parent 9df6f3e commit a3eeda9

27 files changed

+995
-739
lines changed

src/docs/asciidoc/core/core-aop-api.adoc

+47-159
Large diffs are not rendered by default.

src/docs/asciidoc/core/core-aop.adoc

+74-9
Large diffs are not rendered by default.

src/docs/asciidoc/core/core-appendix.adoc

+11-16
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
= Appendix
55

66

7+
8+
79
[[xsd-schemas]]
810
== XML Schemas
911

@@ -123,7 +125,7 @@ Injecting enum values into beans as either property or constructor arguments is
123125
easy to do in Spring, in that you don't actually have to __do__ anything or know
124126
anything about the Spring internals (or even about classes such as the
125127
`FieldRetrievingFactoryBean`). Let's look at an example to see how easy injecting an
126-
enum value is; consider this JDK 5 enum:
128+
enum value is; consider this enum:
127129

128130
[source,java,indent=0]
129131
[subs="verbatim,quotes"]
@@ -134,7 +136,6 @@ enum value is; consider this JDK 5 enum:
134136
135137
TRANSACTION,
136138
EXTENDED
137-
138139
}
139140
----
140141

@@ -152,7 +153,6 @@ Now consider a setter of type `PersistenceContextType`:
152153
public void setPersistenceContextType(PersistenceContextType type) {
153154
this.persistenceContextType = type;
154155
}
155-
156156
}
157157
----
158158

@@ -162,14 +162,10 @@ Now consider a setter of type `PersistenceContextType`:
162162
[subs="verbatim,quotes"]
163163
----
164164
<bean class="example.Client">
165-
<property name="persistenceContextType" value="TRANSACTION" />
165+
<property name="persistenceContextType" value="TRANSACTION"/>
166166
</bean>
167167
----
168168

169-
This works for classic type-safe emulated enums (on JDK 1.4 and JDK 1.3) as well; Spring
170-
will automatically attempt to match the string property value to a constant on the enum
171-
class.
172-
173169

174170
[[xsd-schemas-util-property-path]]
175171
==== <util:property-path/>
@@ -786,14 +782,14 @@ The `NamespaceHandler` interface is pretty simple in that it features just three
786782
* `init()` - allows for initialization of the `NamespaceHandler` and will be called by
787783
Spring before the handler is used
788784
* `BeanDefinition parse(Element, ParserContext)` - called when Spring encounters a
789-
top-level element (not nested inside a bean definition or a different namespace). This
790-
method can register bean definitions itself and/or return a bean definition.
785+
top-level element (not nested inside a bean definition or a different namespace).
786+
This method can register bean definitions itself and/or return a bean definition.
791787
* `BeanDefinitionHolder decorate(Node, BeanDefinitionHolder, ParserContext)` - called
792-
when Spring encounters an attribute or nested element of a different namespace. The
793-
decoration of one or more bean definitions is used for example with
794-
the<<core.adoc#beans-factory-scopes,out-of-the-box scopes Spring 2.0 supports>>. We'll start by
795-
highlighting a simple example, without using decoration, after which we will show
796-
decoration in a somewhat more advanced example.
788+
when Spring encounters an attribute or nested element of a different namespace.
789+
The decoration of one or more bean definitions is used for example with the
790+
<<core.adoc#beans-factory-scopes,out-of-the-box scopes Spring supports>>.
791+
We'll start by highlighting a simple example, without using decoration, after which
792+
we will show decoration in a somewhat more advanced example.
797793

798794
Although it is perfectly possible to code your own `NamespaceHandler` for the entire
799795
namespace (and hence provide code that parses each and every element in the namespace),
@@ -1373,4 +1369,3 @@ http\://www.foo.com/schema/jcache=com.foo.JCacheNamespaceHandler
13731369
# in 'META-INF/spring.schemas'
13741370
http\://www.foo.com/schema/jcache/jcache.xsd=com/foo/jcache.xsd
13751371
----
1376-

src/docs/asciidoc/core/core-beans.adoc

+24-7
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
= The IoC container
33

44

5+
6+
57
[[beans-introduction]]
68
== Introduction to the Spring IoC container and beans
79

@@ -400,6 +402,7 @@ a dependency on a specific bean through metadata (e.g. an autowiring annotation)
400402

401403
[[beans-definition]]
402404
== Bean overview
405+
403406
A Spring IoC container manages one or more __beans__. These beans are created with the
404407
configuration metadata that you supply to the container, for example, in the form of XML
405408
`<bean/>` definitions.
@@ -778,6 +781,7 @@ Spring container that will create objects through an
778781

779782
[[beans-dependencies]]
780783
== Dependencies
784+
781785
A typical enterprise application does not consist of a single object (or bean in the
782786
Spring parlance). Even the simplest application has a few objects that work together to
783787
present what the end-user sees as a coherent application. This next section explains how
@@ -2380,6 +2384,7 @@ shortest string that will match an argument type.
23802384

23812385
[[beans-factory-scopes]]
23822386
== Bean scopes
2387+
23832388
When you create a bean definition, you create a __recipe__ for creating actual instances
23842389
of the class defined by that bean definition. The idea that a bean definition is a
23852390
recipe is important, because it means that, as with a class, you can create many object
@@ -3602,6 +3607,7 @@ beans that require programmatic access to the container.
36023607

36033608
[[beans-child-bean-definitions]]
36043609
== Bean definition inheritance
3610+
36053611
A bean definition can contain a lot of configuration information, including constructor
36063612
arguments, property values, and container-specific information such as initialization
36073613
method, static factory method name, and so on. A child bean definition inherits
@@ -3687,6 +3693,7 @@ context will actually (attempt to) pre-instantiate the `abstract` bean.
36873693

36883694
[[beans-factory-extension]]
36893695
== Container Extension Points
3696+
36903697
Typically, an application developer does not need to subclass `ApplicationContext`
36913698
implementation classes. Instead, the Spring IoC container can be extended by plugging in
36923699
implementations of special integration interfaces. The next few sections describe these
@@ -5173,6 +5180,7 @@ For details about the effects of combining various lifecycle mechanisms, see
51735180

51745181
[[beans-classpath-scanning]]
51755182
== Classpath scanning and managed components
5183+
51765184
Most examples in this chapter use XML to specify the configuration metadata that produces
51775185
each `BeanDefinition` within the Spring container. The previous section
51785186
(<<beans-annotation-config>>) demonstrates how to provide a lot of the configuration
@@ -5299,6 +5307,7 @@ https://github.com/spring-projects/spring-framework/wiki/Spring-Annotation-Progr
52995307
wiki page.
53005308

53015309

5310+
53025311
[[beans-scanning-autodetection]]
53035312
=== Automatically detecting classes and registering bean definitions
53045313

@@ -5839,6 +5848,7 @@ metadata is provided per-instance rather than per-class.
58395848

58405849
[[beans-scanning-index]]
58415850
=== Generating an index of candidate components
5851+
58425852
While classpath scanning is very fast, it is possible to improve the startup performance
58435853
of large applications by creating a static list of candidates at compilation time. In this
58445854
mode, _all modules_ of the application must use this mechanism as, when the
@@ -5893,8 +5903,10 @@ classpath.
58935903

58945904

58955905

5906+
58965907
[[beans-standard-annotations]]
58975908
== Using JSR 330 Standard Annotations
5909+
58985910
Starting with Spring 3.0, Spring offers support for JSR-330 standard annotations
58995911
(Dependency Injection). Those annotations are scanned in the same way as the Spring
59005912
annotations. You just need to have the relevant jars in your classpath.
@@ -6742,6 +6754,7 @@ annotation can be used:
67426754
----
67436755

67446756

6757+
67456758
[[beans-java-configuration-annotation]]
67466759
=== Using the @Configuration annotation
67476760

@@ -7979,7 +7992,7 @@ AspectJ load-time weaving, see <<aop-aj-ltw>>.
79797992

79807993

79817994
[[context-introduction]]
7982-
== Additional Capabilities of the ApplicationContext
7995+
== Additional capabilities of the ApplicationContext
79837996

79847997
As was discussed in the chapter introduction, the `org.springframework.beans.factory`
79857998
package provides basic functionality for managing and manipulating beans, including in a
@@ -8211,7 +8224,7 @@ out the `ReloadableResourceBundleMessageSource` javadocs for details.
82118224

82128225

82138226
[[context-functionality-events]]
8214-
=== Standard and Custom Events
8227+
=== Standard and custom events
82158228

82168229
Event handling in the `ApplicationContext` is provided through the `ApplicationEvent`
82178230
class and `ApplicationListener` interface. If a bean that implements the
@@ -8400,8 +8413,9 @@ http://www.enterpriseintegrationpatterns.com[pattern-oriented], event-driven
84008413
architectures that build upon the well-known Spring programming model.
84018414
====
84028415

8416+
84038417
[[context-functionality-events-annotation]]
8404-
==== Annotation-based Event Listeners
8418+
==== Annotation-based event listeners
84058419

84068420
As of Spring 4.2, an event listener can be registered on any public method of a managed
84078421
bean via the `EventListener` annotation. The `BlackListNotifier` can be rewritten as
@@ -8508,6 +8522,7 @@ This new method will publish a new `ListUpdateEvent` for every `BlackListEvent`
85088522
by the method above. If you need to publish several events, just return a `Collection` of
85098523
events instead.
85108524

8525+
85118526
[[context-functionality-events-async]]
85128527
==== Asynchronous Listeners
85138528

@@ -8534,7 +8549,7 @@ Be aware of the following limitations when using asynchronous events:
85348549

85358550

85368551
[[context-functionality-events-order]]
8537-
==== Ordering Listeners
8552+
==== Ordering listeners
85388553

85398554
If you need the listener to be invoked before another one, just add the `@Order`
85408555
annotation to the method declaration:
@@ -8549,8 +8564,9 @@ annotation to the method declaration:
85498564
}
85508565
----
85518566

8567+
85528568
[[context-functionality-events-generics]]
8553-
==== Generic Events
8569+
==== Generic events
85548570

85558571
You may also use generics to further define the structure of your event. Consider an
85568572
`EntityCreatedEvent<T>` where `T` is the type of the actual entity that got created. You
@@ -8716,14 +8732,15 @@ be used by other application modules on the same machine.
87168732

87178733
[[beans-beanfactory]]
87188734
== The BeanFactory
8735+
87198736
The `BeanFactory` provides the underlying basis for Spring's IoC functionality but it is
87208737
only used directly in integration with other third-party frameworks and is now largely
87218738
historical in nature for most users of Spring. The `BeanFactory` and related interfaces,
87228739
such as `BeanFactoryAware`, `InitializingBean`, `DisposableBean`, are still present in
87238740
Spring for the purposes of backward compatibility with the large number of third-party
87248741
frameworks that integrate with Spring. Often third-party components that can not use
8725-
more modern equivalents such as `@PostConstruct` or `@PreDestroy` in order to remain
8726-
compatible with JDK 1.4 or to avoid a dependency on JSR-250.
8742+
more modern equivalents such as `@PostConstruct` or `@PreDestroy` in order to avoid a
8743+
dependency on JSR-250.
87278744

87288745
This section provides additional background into the differences between the
87298746
`BeanFactory` and `ApplicationContext` and how one might access the IoC container

0 commit comments

Comments
 (0)