Spring Tutorial 23 - Event Handling in Spring
HTML-код
- Опубликовано: 4 ноя 2024
- We'll now look at Spring's support for Event Handling. We'll write an event listener in this tutorial. i'll also show you how to write custom events and publish them anywhere in the code.
The best tutorial series on Spring bean framework!!!!! Outstanding!!
Your tutorials are good. I couldn't stop myself till I complete all your tutorials (1 to 23) which ran me two full days, trying out eclipse projects myself. Of course, it gave a formal, methodical way to knowing Spring framework in detail. Thank you!
Wait a minute...so he added the 24th tutorial later on?
im watching it now in 2020. Still relevant
Great tutorials! Extraordinary teaching skills!!!
Your tutorials are the best. Please include spring/java securities and certificate signature validations in java tutorials.
Your series is the best. Thank you.
Awesome....It's very easy to understand the actual concept. Nice one!!!!
your tutorials are awesome sir... thanks for these :)
You are my Java Spring Teacher. Thank A Lot Teacher.
Thank You! For the tutorials
Great tutorials!!!
This is a Great Start for me . Thank you very much for making such tutorials.
but i have one question if spring core is 100% then what percent we learn from first 23 tutorials.
what is the additional thing we need to learn for spring basic?
As you usual, great content, thanks
Awesome explanation sir!
Excellent tutorial. Nicely done.
Thanks a lot ! You are awesome. :)
Hi Koushik,
First of all thanks for investing your time to help a lot of young people who are struggling to understand the crux of Java programming and its frameworks. And I am sure that many have benefited through your channel.
Coming to the point, Refer [9:26 - 10:00 ] The question is - When "ApplicationEventPublisher" itself is an interface, the method "publishEvent" present in it should be an unimplemented method. But in this case we are able to use the method directly without implementing it in our code.
Can you please brief me the point which I am missing here.
+Jaya Panda The question was actually on the ApplicationEventPublisher interface, not ApplicationEventPublisherAware, which is a separate interface. And it is a valid question. Here's how it works:
ApplicationEventPublisher is extended by ApplicationContext, which is implemented by
ClassPathXmlApplicationContext, which is what Spring instantiates at runtime (the application context). It is this class that actually implements the publishEvent method. The ApplicationEventPublisherAware interface and its associated setter method merely allow the application context to be accessible by instances of the Circle class - nothing else.
thanks a lot...good tutorial..really clear funda of spring from scratch
Koushik you're a star!
vey easy to understand thank you..
4:39 You did it! "What" with a "W"!!
You are awesome!
Great video!
Nice Explanation... Thanks!
quite a useful video.
Koushik... Great explanation.. plz keep up the good work... can you please publish some videos related to JPA and EJB. it will be very useful.
Thanks a lot!
Hy can you please make tutorials about oracle sql developer and how to develop databases and maintaining them and how to benefit from thoses tools and please can you make tutorials also about java desktop development with spring and cover oracle jdeveloper and what is adf and what it provide us and how to use it pleaseeee
you don't need to punch the keyboard
nice tutorial btw
Hi Koushik,
First of all, please accept my many THANKS for you, these tutorials are really awesome!
I would like to ask, if there are any tutorials about learning Web App Development using SpringMVC?
Also, I would like to ask you, about this 23ed video, I noticed that you didn't define a bean for your custom event class DrawEvent in the spring.xml file.
Thanks
It's not necessary to define all the objects into a Spring Container. We will give handle to the spring for those objects which are needed to handle by a spring. So, the DrawEvent object can be instantiated anywhere you need using 'new' keyword as it was not defined in .xml
Hi Kaushik .. can you please provide tutorials for spring transaction ?
thanks, looks great!
Could we have just autowire the ApplicationEventPublisher instead of inplement the ApplicationEventPublisherAware interface.??
He's got DrawEvent drawEvent = new DrawEvent(this). If we were to @Autowired DrawEvent, how would we pass 'this'?
Thanks
i tried coding ahead and didn't implement ApplicationEventPulisherAware but instead got setters andgetters for the applicationeventpublisher and setting it to AutoWired. Why does it work this way as well?
great... thanks.
what do we use this functionality for ?
10:10 MyEvent drawEvent = new MyEvent(this); //We could have avoided this manual object creation
hi koushik i am getting this error. i have tried a lot to fix this can you lell me what went wrong.
Exception in thread "main" org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 99 in XML document from class path resource [SpringHelloWorld.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 99; columnNumber: 32; cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'context:annotiation-config'.
here is the code on github, github.com/parlad/SpringDemo
Why not to Autowire ApplicationEventPublisher?
You can either @Autowire ApplicationEventPublisher or implement the ApplicationEventPulisherAware interface.
i have a code at techno01 wordpress developed watching this video.