Win a copy of Murach's Java Programming this week in the Beginning Java forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Unable to understand output  RSS feed

 
raja singh kumar
Ranch Hand
Posts: 185
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am just trying my hands on spring aop. I am confused with the output. In the MainApp class when I comment the setter then I get advice logs 2 times in the output. But when I use the setter in MainApp class I get advice log only once. I am not sure why it is coming only once whereas there are 2 getters which are called from MainApp?

Thanks for your help

Circle.java


LoggingAspect.java


ShapeService.java


Triangle.java


MainApp.java


Output when setter is commented in MainApp:
Logging advice run...get method called
Logging advice run...get method called

Output when setter is used in MainApp:
Logging advice run...get method called



 
Water! People swim in water! Even tiny ads swim in water:
Thoughts on deprecation in Java
https://coderanch.com/t/683016/java/Deprecation-Java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!