@@ -923,7 +923,7 @@ injection:
923
923
public class SimpleMovieLister {
924
924
925
925
// the SimpleMovieLister has a dependency on a MovieFinder
926
- private MovieFinder movieFinder;
926
+ private final MovieFinder movieFinder;
927
927
928
928
// a constructor so that the Spring container can inject a MovieFinder
929
929
public SimpleMovieLister(MovieFinder movieFinder) {
@@ -943,7 +943,7 @@ injection:
943
943
----
944
944
945
945
Notice that there is nothing special about this class. It is a POJO that
946
- has no dependencies on container specific interfaces, base classes or annotations.
946
+ has no dependencies on container specific interfaces, base classes, or annotations.
947
947
948
948
[[beans-factory-ctor-arguments-resolution]]
949
949
===== Constructor Argument Resolution
@@ -974,10 +974,10 @@ being instantiated. Consider the following class:
974
974
class ThingOne(thingTwo: ThingTwo, thingThree: ThingThree)
975
975
----
976
976
977
- Assuming that `ThingTwo` and `ThingThree` classes are not related by inheritance, no potential
978
- ambiguity exists. Thus, the following configuration works fine, and you do not need to specify
979
- the constructor argument indexes or types explicitly in the `<constructor-arg/>`
980
- element.
977
+ Assuming that the `ThingTwo` and `ThingThree` classes are not related by inheritance, no
978
+ potential ambiguity exists. Thus, the following configuration works fine, and you do not
979
+ need to specify the constructor argument indexes or types explicitly in the
980
+ `<constructor-arg/>` element.
981
981
982
982
[source,xml,indent=0,subs="verbatim,quotes"]
983
983
----
@@ -1006,10 +1006,10 @@ by type without help. Consider the following class:
1006
1006
public class ExampleBean {
1007
1007
1008
1008
// Number of years to calculate the Ultimate Answer
1009
- private int years;
1009
+ private final int years;
1010
1010
1011
1011
// The Answer to Life, the Universe, and Everything
1012
- private String ultimateAnswer;
1012
+ private final String ultimateAnswer;
1013
1013
1014
1014
public ExampleBean(int years, String ultimateAnswer) {
1015
1015
this.years = years;
@@ -1031,7 +1031,7 @@ by type without help. Consider the following class:
1031
1031
.[[beans-factory-ctor-arguments-type]]Constructor argument type matching
1032
1032
--
1033
1033
In the preceding scenario, the container can use type matching with simple types if
1034
- you explicitly specify the type of the constructor argument by using the `type` attribute.
1034
+ you explicitly specify the type of the constructor argument by using the `type` attribute,
1035
1035
as the following example shows:
1036
1036
1037
1037
[source,xml,indent=0,subs="verbatim,quotes"]
@@ -1251,7 +1251,8 @@ visibility of some configuration issues is why `ApplicationContext` implementati
1251
1251
default pre-instantiate singleton beans. At the cost of some upfront time and memory to
1252
1252
create these beans before they are actually needed, you discover configuration issues
1253
1253
when the `ApplicationContext` is created, not later. You can still override this default
1254
- behavior so that singleton beans initialize lazily, rather than being pre-instantiated.
1254
+ behavior so that singleton beans initialize lazily, rather than being eagerly
1255
+ pre-instantiated.
1255
1256
1256
1257
If no circular dependencies exist, when one or more collaborating beans are being
1257
1258
injected into a dependent bean, each collaborating bean is totally configured prior
0 commit comments