Skip to content

Disable bean proxying in configuration classes - #6970

Merged
rwinch merged 1 commit into
spring-projects:masterfrom
eleftherias:gh-6967-proxy-bean-false
Jun 11, 2019
Merged

rwinch merged 1 commit into
spring-projects:masterfrom
eleftherias:gh-6967-proxy-bean-false

Conversation

@eleftherias

Copy link
Copy Markdown
Contributor

Fixes gh-6967

Copy link
Copy Markdown
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

rwinch commented Jun 10, 2019

Copy link
Copy Markdown
Member

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
Copy Markdown
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

rwinch commented Jun 11, 2019

Copy link
Copy Markdown
Member

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