Skip to content

Conversation

quaff
Copy link
Contributor

@quaff quaff commented Aug 30, 2024

Self-Injection is better than horrendous AopContext.currentProxy()

Self-Injection is better than horrendous `AopContext.currentProxy()`
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Aug 30, 2024
@sbrannen sbrannen changed the title Improve proxying document Recommend use of self-injection instead of AopContext.currentProxy() Aug 30, 2024
@sbrannen sbrannen added the type: documentation A documentation task label Aug 30, 2024
@sbrannen sbrannen changed the title Recommend use of self-injection instead of AopContext.currentProxy() Recommend use of self injection instead of AopContext.currentProxy() Aug 30, 2024
@sbrannen sbrannen self-assigned this Aug 30, 2024
@sbrannen sbrannen added this to the 6.2.0-RC1 milestone Aug 30, 2024
@sbrannen sbrannen added in: core Issues in core modules (aop, beans, core, context, expression) and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Aug 30, 2024
@sbrannen
Copy link
Member

Hi @quaff,

Self-Injection is better than horrendous AopContext.currentProxy()

Yes, I totally agree that with! 👍

However, after further analysis, I realized that we cannot use @Autowired in the example you modified in this PR.

In addition, I noticed there was room for improvement in other areas.

In light of that, I am closing this PR as superseded by the following.

Thanks anyway for the PR!

@sbrannen sbrannen closed this Aug 30, 2024
@sbrannen sbrannen removed this from the 6.2.0-RC1 milestone Aug 30, 2024
@sbrannen sbrannen added the status: superseded An issue that has been superseded by another label Aug 30, 2024
@sbrannen
Copy link
Member

@quaff, we may not actually have a "self injection" example anywhere in the reference manual. So, if you'd like to submit a new PR with such an example, feel free to do so.

It should probably go in the new Self Injection sidebar here: https://raw.githubusercontent.com/spring-projects/spring-framework/main/framework-docs/modules/ROOT/pages/core/beans/annotation-config/autowired.adoc#beans-autowired-annotation-self-injection

@quaff
Copy link
Contributor Author

quaff commented Sep 2, 2024

@quaff, we may not actually have a "self injection" example anywhere in the reference manual. So, if you'd like to submit a new PR with such an example, feel free to do so.

It should probably go in the new Self Injection sidebar here: https://raw.githubusercontent.com/spring-projects/spring-framework/main/framework-docs/modules/ROOT/pages/core/beans/annotation-config/autowired.adoc#beans-autowired-annotation-self-injection

@sbrannen I created #33462.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) status: superseded An issue that has been superseded by another type: documentation A documentation task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants