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

Accept ajc-compiled @Aspect classes for Spring AOP proxy usage #32793

Closed
jhoeller opened this issue May 10, 2024 · 0 comments
Closed

Accept ajc-compiled @Aspect classes for Spring AOP proxy usage #32793

jhoeller opened this issue May 10, 2024 · 0 comments
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) status: backported An issue that has been backported to maintenance branches type: enhancement A general enhancement
Milestone

Comments

@jhoeller
Copy link
Contributor

jhoeller commented May 10, 2024

In order to ship @Aspect classes for usage with Spring AOP proxies as well as AspectJ load-time and compile-time weaving, they need to be fully compiled with ajc. This is the case for Micrometer's TimedAspect: micrometer-metrics/micrometer#1149

Our isAspect() check in AbstractAspectJAdvisorFactory does not accept ajc-compiled classes since it assumes that those are classic aspect classes which are not suitable for usage with Spring AOP. Let's relax that check, we only really need isAspect() to tell us what we need to introspect; we do not need it to determine actual advice compatibility.

@jhoeller jhoeller added in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement labels May 10, 2024
@jhoeller jhoeller added this to the 6.1.7 milestone May 10, 2024
@jhoeller jhoeller self-assigned this May 10, 2024
@github-actions github-actions bot added status: backported An issue that has been backported to maintenance branches and removed for: backport-to-6.0.x labels May 14, 2024
jhoeller added a commit that referenced this issue May 14, 2024
AspectJExpressionPointcut leniently ignores unsupported expression.

Closes gh-32793
jhoeller added a commit that referenced this issue May 14, 2024
AspectJExpressionPointcut leniently ignores unsupported expression.

Closes gh-32793
jhoeller added a commit that referenced this issue May 17, 2024
jhoeller added a commit that referenced this issue May 17, 2024
jhoeller added a commit that referenced this issue May 23, 2024
This covers AspectJ transaction and caching aspects when encountered by Spring AOP.

Closes gh-32882
See gh-32793
jhoeller added a commit that referenced this issue May 23, 2024
This covers AspectJ transaction and caching aspects when encountered by Spring AOP.

Closes gh-32882
See gh-32793

(cherry picked from commit 6d7cd9c)
jhoeller added a commit that referenced this issue May 23, 2024
This covers AspectJ transaction and caching aspects when encountered by Spring AOP.

Closes gh-32882
See gh-32793

(cherry picked from commit 6d7cd9c)
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: backported An issue that has been backported to maintenance branches type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant