Update the developer guide to explicitly reference the (inferred)
constant introduced in 38e90105a0.
Also emphasis the fact that the (inferred) mode is enabled by default
with Java config and how to disable it if necessary.
Issue: SPR-12534
@ -4142,7 +4142,8 @@ unnecessarily couples the code to Spring. Alternatively, use
@@ -4142,7 +4142,8 @@ unnecessarily couples the code to Spring. Alternatively, use
the <<beans-postconstruct-and-predestroy-annotations, `@PostConstruct`>> annotation or
specify a POJO initialization method. In the case of XML-based configuration metadata,
you use the `init-method` attribute to specify the name of the method that has a void
no-argument signature. For example, the following definition:
no-argument signature. With Java config you use the `initMethod` attribute of `@Bean`,
see <<beans-java-lifecycle-callbacks>>. For example, the following:
[source,xml,indent=0]
[subs="verbatim,quotes"]
@ -4201,8 +4202,9 @@ It is recommended that you do not use the `DisposableBean` callback interface be
@@ -4201,8 +4202,9 @@ It is recommended that you do not use the `DisposableBean` callback interface be
unnecessarily couples the code to Spring. Alternatively, use
the <<beans-postconstruct-and-predestroy-annotations, `@PreDestroy`>> annotation or
specify a generic method that is supported by bean definitions. With XML-based
configuration metadata, you use the `destroy-method` attribute on the `<bean/>`. For
example, the following definition:
configuration metadata, you use the `destroy-method` attribute on the `<bean/>`. With
Java config you use the `destroyMethod` attribute of `@Bean`, see
<<beans-java-lifecycle-callbacks>>. For example, the following definition:
[source,xml,indent=0]
[subs="verbatim,quotes"]
@ -4244,6 +4246,15 @@ is exactly the same as:
@@ -4244,6 +4246,15 @@ is exactly the same as:
but does not couple the code to Spring.
[TIP]
====
The `destroy-method` attribute of a `<bean/>` element can have a special `(inferred)`
value to automatically detect either a `close` or `shutdown` public method on the
specific bean class. This special value can also be set on the
`default-destroy-method` to apply that behavior to a set of beans (see
<<beans-factory-lifecycle-default-init-destroy-methods>>). Note that this is the