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

Add section on AspectJ support #32642

Closed
hannah23280 opened this issue Oct 8, 2022 · 3 comments
Closed

Add section on AspectJ support #32642

hannah23280 opened this issue Oct 8, 2022 · 3 comments
Labels
type: documentation A documentation update
Milestone

Comments

@hannah23280
Copy link

hannah23280 commented Oct 8, 2022

Spring boot : v2.7.4

Hi,

I observe that if I did not add @EnableAspectJAutoProxy, my aspect can still work. So may i confirm if @EnableAspectJAutoProxy is optional?

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Oct 8, 2022
@hannah23280
Copy link
Author

hannah23280 commented Oct 8, 2022

Spring boot : v2.7.4

Hi, I observe that if I did not add @EnableAspectJAutoProxy, my aspect can still work. So may i confirm if @EnableAspectJAutoProxy is optional?

Somehow my experiments seem to point that @EnableAspectJAutoProxy is not really needed due to auto-configuration in spring boot. Is my understanding correct? Does spring boot documentation t mention anything about this?

@snicoll snicoll changed the title @EnableAspectJAutoProxy is optional? Add section on AspectJ support Oct 9, 2022
@snicoll
Copy link
Member

snicoll commented Oct 9, 2022

You are correct. spring.aop.auto is the only mention of this in the reference guide so we should perhaps add a short section to describe what the auto-config does, in particular the fact we opt-in for CGLIB classes by default.

@snicoll snicoll added the for: team-attention An issue we'd like other members of the team to review label Oct 9, 2022
@bclozel bclozel added type: documentation A documentation update and removed for: team-attention An issue we'd like other members of the team to review status: waiting-for-triage An issue we've not yet triaged labels Dec 5, 2022
@bclozel bclozel added this to the 3.x milestone Dec 5, 2022
@nightswimmings
Copy link

A thing I always wondered is why is CGLIB the reference, when AspectJ supports proxying internal methods of a class (typical catcher). Or at least that was my mental note when I researched the topic some years ago

@mhalbritter mhalbritter modified the milestones: 3.x, 2.7.x Oct 27, 2023
@wilkinsona wilkinsona modified the milestones: 2.7.x, 2.7.18 Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: documentation A documentation update
Projects
None yet
Development

No branches or pull requests

7 participants