@@ -4248,10 +4248,11 @@ but does not couple the code to Spring.
4248
4248
4249
4249
[TIP]
4250
4250
====
4251
- The `destroy-method` attribute of a `<bean/>` element can have a special `(inferred)`
4252
- value to automatically detect either a `close` or `shutdown` public method on the
4253
- specific bean class. This special value can also be set on the
4254
- `default-destroy-method` to apply that behavior to a set of beans (see
4251
+ The `destroy-method` attribute of a `<bean>` element can be assigned a special
4252
+ `(inferred)` value which instructs Spring to automatically detect a public `close` or
4253
+ `shutdown` method on the specific bean class. This special `(inferred)` value can also be
4254
+ set on the `default-destroy-method` attribute of a `<beans>` element to apply this
4255
+ behavior to an entire set of beans (see
4255
4256
<<beans-factory-lifecycle-default-init-destroy-methods>>). Note that this is the
4256
4257
default behavior with Java config.
4257
4258
====
@@ -7263,11 +7264,11 @@ on the `bean` element:
7263
7264
7264
7265
[NOTE]
7265
7266
====
7266
- By default, beans defined using Java config having a `close` or `shutdown` public method
7267
- are automatically enlisted with a destruction callback. If you have a `close` or ` public`
7268
- method and you do not wish it to be called when the container shuts down, simply add
7269
- `@Bean(destroyMethod="")` to your bean definition to disable the default `(inferred)`
7270
- mode.
7267
+ By default, beans defined using Java config that have a public `close` or `shutdown`
7268
+ method are automatically enlisted with a destruction callback. If you have a public
7269
+ `close` or `shutdown` method and you do not wish for it to be called when the container
7270
+ shuts down, simply add `@Bean(destroyMethod="")` to your bean definition to disable the
7271
+ default `(inferred)` mode.
7271
7272
====
7272
7273
7273
7274
Of course, in the case of `Foo` above, it would be equally as valid to call the `init()`
0 commit comments