I wonder what the guy who came up with AOP was thinking when he came up with such weird terms: pointcut, advice, joinpoint, etc.
@roman_mf2 жыл бұрын
What an excellent introduction into AOP! I'd heard about AOP before but didn't have any clue what was that thing about until I needed to call a method before each method of a class is called in my Spring app. Glad I ended up on this playlist, AOP ain't that scary anymore. :-) Thanks for sharing knowledge.
@shilpag532911 жыл бұрын
Really Amazing Explanation Sir. Best Teacher in Software Sir. thanks a lot.
@kumarsantoshdash9 жыл бұрын
Nice tutorial series. I am learning Spring and usually refer a book, but whenever I am stuck the series really helps me.
@prasadb721310 жыл бұрын
One of the best tutorials.
@atulkmishraji13 жыл бұрын
Thank you very much for such a wonderful tutorial Koushik...I am waiting eagerly for next uploads from you on this series...I hope you have plan to cover the remaining sections (Spring MVC, Spring hibernate, Spring JDBC etc) of Spring as well.
@ruchit_kadakia8 жыл бұрын
You are just AWESOME :)
@amulkumar2415 жыл бұрын
i have a doubt...a real silly one why are we using setName separate in the main method at 9:04. Doesn't using tag in the spring.xml invoke the setter and assign value to the variable "name"?
@prabhsingh735 жыл бұрын
Defining the tag will automatically invoke the setter method but only when the class is configured as a bean. here Circle is not a bean. So the setter will not be automatically invokes
@PHLYLM4 жыл бұрын
@@prabhsingh73 Circle is a bean here. He configured it inside the spring.xml in video #26: kzbin.info/www/bejne/emHInJmHg6yaprs The reason *Circle.setName()* is called directly here is because he wanted to demonstrate the pointcut expression *@Pointcut("args(String)")*. *Circle.setName()* is a good candidate because it's the only class method we've written so far that takes one single String parameter.
@reachmanav7 жыл бұрын
I have a below query for fellow programmers: (I know its kind of a bit destructive coding, but wanted to try out anyways) @Pointcut("within(org.manav.javbrains.model.Circle)") public void circleAllMethods() {} @Before("circleAllMethods()") public void LoggingAdvice(JoinPoint joinPoint) { //System.out.println("Aspect method LoggingAdvice() called. " + joinPoint.toString()); Circle cir = (Circle) joinPoint.getTarget(); cir.setName("Dummy Name"); System.out.println("Aspect method LoggingAdvice() called. " + joinPoint.toString()); System.out.println("Exiting from Advice"); } For all the Circle class methods, I created this advise should execute. But when I get the handle and set the name, it should again trigger this advice which should again setName, and keep repeating - however, it doesn't I just get the below response: Aspect method LoggingAdvice() called. execution(String org.manav.javbrains.model.Circle.getName()) Exiting from Advice Dummy Name Why it won't call the advise again?
@MissPiggyM9769 жыл бұрын
Great stuff!
@vineetvideos9 жыл бұрын
Can we apply Advice Argument for any specific packages classes or for set of different classes? If yes, thenhow? Thanks, Vineet
@bunthaideng24926 жыл бұрын
You're awesome!!
@raghebadel568912 жыл бұрын
Hi, it seems my reply is too late, but i recommend to take a look at Grails framework, it's based on Spring and hibernate, and you will understand it especially after these tutorials many thanks @koushks
@RamyachowdaryUdathaneni Жыл бұрын
hi sir,when am using Aspect annotation it is creating error .I used the same code which you explained in your videos Error creating bean with name 'circle' defined in class path resource [SpringAop.xml]: Initialization of bean failed; nested exception is java.lang.ExceptionInInitializerError i have been working on it and not resolving.could you please help
@vovyklembergsohn17789 жыл бұрын
i' m getting a stackoverflow error trying to print sth in the method annotated with @Before("args(String)") although my code is identical to the one in the tutorial. i' d appreciate it if any one explained why this is happening.
@krzysztofm10597 жыл бұрын
did u fix this? i ve the same problem
@ebisu63747 жыл бұрын
It's probably because System.out.println takes String as argument, and advice is triggered again because it watches for String arguments, so it repeats infinitely thus stackoverflow happens.