Skip to content

Commit 4b0531b

Browse files
committed
Merge branch '5.3.x'
2 parents 5ddbdb6 + 48c797e commit 4b0531b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -693,10 +693,11 @@ able to call this method (with optional arguments, as described later) and retur
693693
object, which subsequently is treated as if it had been created through a constructor.
694694
One use for such a bean definition is to call `static` factories in legacy code.
695695

696-
The following bean definition specifies that the bean be created by calling a
696+
The following bean definition specifies that the bean will be created by calling a
697697
factory method. The definition does not specify the type (class) of the returned object,
698-
only the class containing the factory method. In this example, the `createInstance()`
699-
method must be a static method. The following example shows how to specify a factory method:
698+
but rather the class containing the factory method. In this example, the
699+
`createInstance()` method must be a `static` method. The following example shows how to
700+
specify a factory method:
700701

701702
[source,xml,indent=0,subs="verbatim,quotes"]
702703
----
@@ -725,6 +726,7 @@ The following example shows a class that would work with the preceding bean defi
725726
class ClientService private constructor() {
726727
companion object {
727728
private val clientService = ClientService()
729+
@JvmStatic
728730
fun createInstance() = clientService
729731
}
730732
}

0 commit comments

Comments
 (0)