Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable bean proxying in configuration classes #6970

Merged
merged 1 commit into from
Jun 11, 2019

Conversation

eleftherias
Copy link
Contributor

Fixes gh-6967

@@ -49,7 +49,7 @@
* {@link AuthenticationManagerBuilder}. For example:
*
* <pre class="code">
* &#064;Configuration
* &#064;Configuration(proxyBeanMethods = false)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The spring security annotations such as @EnableGlobalAuthentication do not set proxyBeanMethods=false by default, to avoid breaking changes.
I have updated the Javadoc to encourage users to add the additional annotation @Configuration(proxyBeanMethods = false).

@eleftherias eleftherias added in: config An issue in spring-security-config type: enhancement A general enhancement labels Jun 10, 2019
@eleftherias eleftherias added this to the 5.2.0.M3 milestone Jun 10, 2019
@rwinch
Copy link
Member

rwinch commented Jun 10, 2019

Thanks for the PR @eleftherias! I think documenting to specify proxyBeanMethods=false helps for passivity, but I don't think we want to do that at the cost of preventing users getting the benefits of disabling proxyBeanMethods going forward. I'd recommend removing this from the docs.

@eleftherias eleftherias force-pushed the gh-6967-proxy-bean-false branch from 28ff946 to d31eab6 Compare June 10, 2019 20:19
@eleftherias
Copy link
Contributor Author

@rwinch proxyBeanMethods=false has been removed from the Javadoc.

@rwinch rwinch self-assigned this Jun 11, 2019
@rwinch rwinch merged commit 1ec040e into spring-projects:master Jun 11, 2019
@rwinch
Copy link
Member

rwinch commented Jun 11, 2019

Thanks @eleftherias! This is now merged into master

@rwinch rwinch added the status: duplicate A duplicate of another issue label Jun 11, 2019
@eleftherias eleftherias deleted the gh-6967-proxy-bean-false branch August 26, 2019 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: config An issue in spring-security-config status: duplicate A duplicate of another issue type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make Spring web configuration classes use proxyBeanMethods=false by default
2 participants