Spring Tutorial 30 - JoinPoints and Advice Arguments

  Рет қаралды 159,590

Java Brains

Java Brains

Күн бұрын

Пікірлер
@scraper1000
@scraper1000 10 жыл бұрын
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_mf
@roman_mf 2 жыл бұрын
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.
@shilpag5329
@shilpag5329 11 жыл бұрын
Really Amazing Explanation Sir. Best Teacher in Software Sir. thanks a lot.
@kumarsantoshdash
@kumarsantoshdash 9 жыл бұрын
Nice tutorial series. I am learning Spring and usually refer a book, but whenever I am stuck the series really helps me.
@prasadb7213
@prasadb7213 10 жыл бұрын
One of the best tutorials.
@atulkmishraji
@atulkmishraji 13 жыл бұрын
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_kadakia
@ruchit_kadakia 8 жыл бұрын
You are just AWESOME :)
@amulkumar241
@amulkumar241 5 жыл бұрын
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"?
@prabhsingh73
@prabhsingh73 5 жыл бұрын
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
@PHLYLM
@PHLYLM 4 жыл бұрын
​@@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.
@reachmanav
@reachmanav 7 жыл бұрын
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?
@MissPiggyM976
@MissPiggyM976 9 жыл бұрын
Great stuff!
@vineetvideos
@vineetvideos 9 жыл бұрын
Can we apply Advice Argument for any specific packages classes or for set of different classes? If yes, thenhow? Thanks, Vineet
@bunthaideng2492
@bunthaideng2492 6 жыл бұрын
You're awesome!!
@raghebadel5689
@raghebadel5689 12 жыл бұрын
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
@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
@vovyklembergsohn1778
@vovyklembergsohn1778 9 жыл бұрын
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.
@krzysztofm1059
@krzysztofm1059 7 жыл бұрын
did u fix this? i ve the same problem
@ebisu6374
@ebisu6374 7 жыл бұрын
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.
@harsha899
@harsha899 5 жыл бұрын
solution for it??
@cafeta
@cafeta 12 жыл бұрын
Thanks!
@rahulrana2919
@rahulrana2919 5 жыл бұрын
thanks a lot :)
@DiegoManuelBenitezEnciso
@DiegoManuelBenitezEnciso 12 жыл бұрын
thanks
Spring Tutorial 31 - After Advice Types
20:58
Java Brains
Рет қаралды 139 М.
Spring Tutorial 35 - Understanding AOP Proxies
16:34
Java Brains
Рет қаралды 125 М.
Beat Ronaldo, Win $1,000,000
22:45
MrBeast
Рет қаралды 158 МЛН
小丑教训坏蛋 #小丑 #天使 #shorts
00:49
好人小丑
Рет қаралды 54 МЛН
We Attempted The Impossible 😱
00:54
Topper Guild
Рет қаралды 56 МЛН
Spring Tutorial 28 - Pointcuts and Wildcard Expressions
19:25
Java Brains
Рет қаралды 203 М.
Spring Tutorial 32 - Around Advice Type
14:54
Java Brains
Рет қаралды 116 М.
Microservices explained - the What, Why and How?
18:30
TechWorld with Nana
Рет қаралды 905 М.
Spring AOP Tutorial - with Aspectj Examples
23:49
in28minutes
Рет қаралды 111 М.
Beat Ronaldo, Win $1,000,000
22:45
MrBeast
Рет қаралды 158 МЛН