• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Spring AOP @AfterThrowing Advice not being executed

 
Roshni Chandrashekar
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The @AfterThrowing advice I have defined is not getting executed. Could some one take a look and please help me out? Below is the code I am using.

Pom.xml




spring-context.xml



LoggingAspect.java



SampleClassUnderAOP


TestAOP unit test class


 
Bill Gorder
Bartender
Posts: 1682
7
Android IntelliJ IDE Linux Mac OS X Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You don't have an interface so the proxy is not being called. If you are going to go this route you need to force the use of CGLIB class proxying (or use full AspectJ rather than Springs)

Try
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic