Add note regarding proxyTargetClass for Java config and web controllers

See gh-23744
This commit is contained in:
Sam Brannen 2019-10-02 13:11:06 +02:00
parent 96930924b2
commit f16e29892e
1 changed files with 4 additions and 2 deletions

View File

@ -1440,8 +1440,10 @@ controller. When this is the case, for controllers specifically, we recommend
using class-based proxying. This is typically the default choice with controllers.
However, if a controller must implement an interface that is not a Spring Context
callback (such as `InitializingBean`, `*Aware`, and others), you may need to explicitly
configure class-based proxying. For example, with `<tx:annotation-driven/>`, you can
change to `<tx:annotation-driven proxy-target-class="true"/>`.
configure class-based proxying. For example, with `<tx:annotation-driven/>` you can
change to `<tx:annotation-driven proxy-target-class="true"/>`, and with
`@EnableTransactionManagement` you can change to
`@EnableTransactionManagement(proxyTargetClass = true)`.