You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We originally discussed this in #22596 but we discarded that because we felt it would make the task harder for people to extend those configuration classes (DelegatingWebFluxConfiguration and DelegatingWebMvcConfiguration).
After discussing that with @wilkinsona , it seems that it's actually the opposite. If a developer extends one of those with an @Configuration class, that new config class will use proxying, even if the parent class has the proxyBeanMethods=false option. On the other hand, a developer looking at these infrastructure classes can't guess that they can be used with a proxyBeanMethods=false setup, or at least they won't get any guarantee on that while reading the source code.
We should add the proxyBeanMethods=false option on these classes because:
This will improve the performance for non-Spring Boot users
This will provide hints to developers extending those classes, telling them that it's safe to use without proxying
This won't break existing use cases are this is opt-in only
The text was updated successfully, but these errors were encountered:
jhoeller
changed the title
Make Spring web configuration classes use proxyBeanMethods=true by default
Make Spring web configuration classes use proxyBeanMethods=false by default
May 20, 2019
We originally discussed this in #22596 but we discarded that because we felt it would make the task harder for people to extend those configuration classes (
DelegatingWebFluxConfiguration
andDelegatingWebMvcConfiguration
).After discussing that with @wilkinsona , it seems that it's actually the opposite. If a developer extends one of those with an
@Configuration
class, that new config class will use proxying, even if the parent class has theproxyBeanMethods=false
option. On the other hand, a developer looking at these infrastructure classes can't guess that they can be used with aproxyBeanMethods=false
setup, or at least they won't get any guarantee on that while reading the source code.We should add the
proxyBeanMethods=false
option on these classes because:The text was updated successfully, but these errors were encountered: