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

Document that pertypewithin is supported by Spring AOP #25887

Closed
dngzs opened this issue Oct 9, 2020 · 4 comments
Closed

Document that pertypewithin is supported by Spring AOP #25887

dngzs opened this issue Oct 9, 2020 · 4 comments
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: documentation A documentation task
Milestone

Comments

@dngzs
Copy link

dngzs commented Oct 9, 2020

I can write like this.

@Component
@Aspect("pertypewithin(com..*)")
@Scope("prototype")
public class TimeAspect {
 
    @Pointcut("execution(* com.dngzs.spring.service..*.*(..))")
    public void time() {
    }

    @Before("time()")
    public void before(JoinPoint joinpoint) {
        System.out.println("before:" + joinpoint);
    }
}

The official document is written like this:

Spring supports AspectJ’s perthis and pertarget instantiation models; percflow, percflowbelow, and pertypewithin are not currently supported.

Is my example wrong?

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Oct 9, 2020
@sbrannen
Copy link
Member

sbrannen commented Oct 9, 2020

I've edited your comment to improve the formatting. You might want to check out this Mastering Markdown guide for future reference.

@sbrannen sbrannen changed the title spring aop not support pertypewithin? Does Spring AOP support pertypewithin? Oct 9, 2020
@sbrannen sbrannen added the in: core Issues in core modules (aop, beans, core, context, expression) label Oct 9, 2020
@dngzs
Copy link
Author

dngzs commented Oct 10, 2020

HI
Are there any results? Looking forward to your reply, thank you very much

@sbrannen
Copy link
Member

Based on the implementation of AspectMetadata, it appears that Spring AOP does support pertypewithin; however, we don't have any tests in place to prove that, and as you pointed out the documentation does not list it as supported.

So perhaps we just need to update the documentation.

@jhoeller, thoughts?

@dngzs
Copy link
Author

dngzs commented Oct 15, 2020

Is the problem ready to fix the document? When to fix , Looking forward to reply @sbrannen @jhoeller

@snicoll snicoll changed the title Does Spring AOP support pertypewithin? Documentat that pertypewithin is supported by Spring AOT Nov 2, 2023
@snicoll snicoll added type: documentation A documentation task and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Nov 2, 2023
@snicoll snicoll added this to the 6.0.14 milestone Nov 2, 2023
@snicoll snicoll changed the title Documentat that pertypewithin is supported by Spring AOT Document that pertypewithin is supported by Spring AOT Nov 2, 2023
@snicoll snicoll self-assigned this Nov 2, 2023
@snicoll snicoll closed this as completed in e731073 Nov 2, 2023
@sbrannen sbrannen changed the title Document that pertypewithin is supported by Spring AOT Document that pertypewithin is supported by Spring AOP Nov 2, 2023
@sbrannen sbrannen changed the title Document that pertypewithin is supported by Spring AOP Document that pertypewithin is supported by Spring AOP Nov 2, 2023
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) type: documentation A documentation task
Projects
None yet
Development

No branches or pull requests

4 participants