Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f16e298

Browse files
committed
Add note regarding proxyTargetClass for Java config and web controllers
See spring-projectsgh-23744
1 parent 9693092 commit f16e298

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/docs/asciidoc/web/webmvc.adoc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1440,8 +1440,10 @@ controller. When this is the case, for controllers specifically, we recommend
14401440
using class-based proxying. This is typically the default choice with controllers.
14411441
However, if a controller must implement an interface that is not a Spring Context
14421442
callback (such as `InitializingBean`, `*Aware`, and others), you may need to explicitly
1443-
configure class-based proxying. For example, with `<tx:annotation-driven/>`, you can
1444-
change to `<tx:annotation-driven proxy-target-class="true"/>`.
1443+
configure class-based proxying. For example, with `<tx:annotation-driven/>` you can
1444+
change to `<tx:annotation-driven proxy-target-class="true"/>`, and with
1445+
`@EnableTransactionManagement` you can change to
1446+
`@EnableTransactionManagement(proxyTargetClass = true)`.
14451447

14461448

14471449

0 commit comments

Comments
 (0)