From 3125ef784cca6280f1fc7fb2c7521f660fcdaa3c Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Thu, 18 Dec 2014 13:41:59 +0100 Subject: [PATCH] Polish documentation for inferred bean destruction mode --- src/asciidoc/index.adoc | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/asciidoc/index.adoc b/src/asciidoc/index.adoc index ccf1f437f8..480170aec5 100644 --- a/src/asciidoc/index.adoc +++ b/src/asciidoc/index.adoc @@ -4248,10 +4248,11 @@ but does not couple the code to Spring. [TIP] ==== -The `destroy-method` attribute of a `` 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 +The `destroy-method` attribute of a `` element can be assigned a special +`(inferred)` value which instructs Spring to automatically detect a public `close` or +`shutdown` method on the specific bean class. This special `(inferred)` value can also be +set on the `default-destroy-method` attribute of a `` element to apply this +behavior to an entire set of beans (see <>). Note that this is the default behavior with Java config. ==== @@ -7263,11 +7264,11 @@ on the `bean` element: [NOTE] ==== -By default, beans defined using Java config having a `close` or `shutdown` public method -are automatically enlisted with a destruction callback. If you have a `close` or `public` -method and you do not wish it to be called when the container shuts down, simply add -`@Bean(destroyMethod="")` to your bean definition to disable the default `(inferred)` -mode. +By default, beans defined using Java config that have a public `close` or `shutdown` +method are automatically enlisted with a destruction callback. If you have a public +`close` or `shutdown` method and you do not wish for it to be called when the container +shuts down, simply add `@Bean(destroyMethod="")` to your bean definition to disable the +default `(inferred)` mode. ==== Of course, in the case of `Foo` above, it would be equally as valid to call the `init()` -- GitLab