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

Spring AOP - @Pointcut: @Before advice for @Test methods does not work [SPR-14751] #19317

Closed
spring-issuemaster opened this issue Sep 26, 2016 · 2 comments

Comments

@spring-issuemaster
Copy link
Collaborator

@spring-issuemaster spring-issuemaster commented Sep 26, 2016

Manuel Jordan opened SPR-14751 and commented

Hello

Please read Spring AOP - @Pointcut: @Before advice for @Test methods does not work.

I want to know if the behaviour is normal or not.

Not sure if Sergey's answer is correct or not. I want assume that I need some Spring extra configuration to get everything working how is expected. I am assuming that Spring should managed this and not disable it how seems the answer suggest

Your explanation about this situation with the solution (extra configuration if exists) should be added in the Spring Framework Reference Documentation

Thanks a lot by your understanding.


Affects: 4.3 GA

Reference URL: http://stackoverflow.com/questions/39619982/spring-aop-pointcut-before-advice-for-test-methods-does-not-work/39695779#39695779

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented Sep 26, 2016

Sam Brannen commented

I have answered the question on Stack Overflow.

In summary, Spring is not involved in the instantiation of test classes and therefore is not in a position to apply AspectJ advice to such a test instance.

I am therefore resolving this issue as Works as Designed.

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented Sep 26, 2016

Manuel Jordan commented

Hello Sam

Again thanks by the valuable support.

In summary, Spring is not involved in the instantiation of test classes and therefore is not in a position to apply AspectJ advice to such a test instance.

I am confused in some way about that, I wrote a comment in Stack Overflow about that.

Best regards!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.