Spring Boot WebFlux | Global Exception Handling | Functional Endpoints | JavaTechie

  Рет қаралды 26,405

Java Techie

Java Techie

Күн бұрын

This tutorial will explain you how to handle exception in Spring Reactive functional endpoint
As we all know, Error handling is one of the ways we make sure we handle our failures consistently. The benefit of handling exceptions globally is that we can customize all error output from our API into a single format that all consumers can understand and This will guarantee us easier and faster maintenance isn't it .
Offer will close soon so Hurry-up & Register today itself!
COURSE LINK : javatechie5246...
PROMO CODE : Java40
GitHub:
github.com/Jav...
Blogs:
/ javatechie
Facebook:
/ javatechie
guys if you like this video please do subscribe now and press the bell icon to not miss any update from Java Techie
Disclaimer/Policy:
--------------------------------
Note : All uploaded content in this channel is mine and its not copied from any community ,
you are free to use source code from above mentioned GitHub account

Пікірлер: 39
@diazchg
@diazchg 2 жыл бұрын
Ahhhhhhhhh, finally! Exception handling hs been Hard for me while learning functional programming. Thanks!!
@tohirasadov689
@tohirasadov689 2 жыл бұрын
Finally! Best example. Best of all the best
@AGAGARCIA
@AGAGARCIA 2 жыл бұрын
Great Job. Thanks for share your knowledge.
@arunpallayil9485
@arunpallayil9485 2 жыл бұрын
Nicely done! Great explanation as usual! Thank you!
@vishalkaushal4311
@vishalkaushal4311 2 жыл бұрын
You are seriously great. Hats off.
@life.at_7000rpm
@life.at_7000rpm Жыл бұрын
In case the custom handler does not take effect, add @Order(-2) on your handler class to give it a higher priority than the DefaultErrorWebExceptionHandler.
@kubickrock572
@kubickrock572 Жыл бұрын
Thank you man ! Great video.
@leanaf
@leanaf 4 ай бұрын
Great tuto!! thanks man!
@sureshbabu4167
@sureshbabu4167 2 жыл бұрын
Superb brother as usual 👏 👌
@anthonya880
@anthonya880 2 жыл бұрын
Request you to please make some content explaining Spring Api Gateway vs Kubernets Ingress. Which one should we use? Or can we use both together ?
@amazingboy8860
@amazingboy8860 7 ай бұрын
You are awesome sir
@malleswarrao3887
@malleswarrao3887 Жыл бұрын
Super
@ajisegirisunday2885
@ajisegirisunday2885 2 жыл бұрын
Thanks you are the best... Please can you do a video using hibernate with spring webflux 🙏
@Javatechie
@Javatechie 2 жыл бұрын
Hibernate?
@ajisegirisunday2885
@ajisegirisunday2885 2 жыл бұрын
@@Javatechie yes please. reactive hibernate
@kumarguru3044
@kumarguru3044 2 жыл бұрын
Can you also explain about both WebClient and rest template which is used to call from one rest service to another rest service
@ayushmittal7059
@ayushmittal7059 Жыл бұрын
Thanks a lot , it was really helpful also can you help in writing the unit test cases of these 2 classes that exception handler and global error attributes as for my project only 3% coverage is there for these 2 classes
@Saravanan-lj9so
@Saravanan-lj9so 2 жыл бұрын
Great.In the real time every one use storedprocedure call for database. Can we call sp from reactive program?
@Javatechie
@Javatechie 2 жыл бұрын
I guess yes we can but let me check
@malleswarrao3887
@malleswarrao3887 Жыл бұрын
Can you please tell me how can I validate the model data in reactive programming
@faithfulolaleru7255
@faithfulolaleru7255 Жыл бұрын
this saved me a lot of trial and error, thanks. But quick question, instead of having one fixed status of bad request in global error attributes, how can I make it dynamic so when I throw a new exception, I can pass along the status I want with it, be it 404 not found or 401 unauthorized
@Javatechie
@Javatechie Жыл бұрын
You can use @ResponseStatus annotations
@faithfulolaleru7255
@faithfulolaleru7255 Жыл бұрын
@@Javatechie thanks for the reply, I've read on the annotation and still a little bit confused. After putting the @ResponseStatus on the different exception classes, in the getErrorAttributes(), we are hardcoding the fields to be returned, how can I make those fields change their values i.e I added a statusCode field that I want to display with my error response, how can I update it in getErrorAttributes() based off what exception is being hit?
@Javatechie
@Javatechie Жыл бұрын
No buddy how it's hardcoded . To make it dynamic better to create multiple exception class use one for 400 and different for 500 like that
@faithfulolaleru7255
@faithfulolaleru7255 Жыл бұрын
@@Javatechie I have multiple exception classes with different responseStatuses, but check 17:35, it'll always return bad request regardless of which exception class it hits. So in getErrorAttributes() (check from 24:45) , I added an httpStatus field to my map, that I now get in the exceptionHandler to set the status. So my question now is, how to I change the httpStatus field in getErrorAttributes() to change depending on which exception is hit in the application
@SatyaPrakash-gj5vp
@SatyaPrakash-gj5vp Жыл бұрын
Could you please make a a video on ReactiveSecurityContextHolder
@Javatechie
@Javatechie Жыл бұрын
Okay i will do that
@harshverm776
@harshverm776 Жыл бұрын
Hi, It is looking bit tough then our traditional rest endpoints. Could you please suggest some topic to learn this Functional Programming ?
@Javatechie
@Javatechie Жыл бұрын
I would suggest you to be a master in java 8 before start reactive functional programming
@harshverm776
@harshverm776 Жыл бұрын
@@Javatechie Okay, but I am already having knowledge of Java 8.
@Javatechie
@Javatechie Жыл бұрын
Then you can easily grab a reactive functional style of coding. Keep practicing
@harshverm776
@harshverm776 Жыл бұрын
@@Javatechie Okay, Thank you.
@user-gv1lh6wj9k
@user-gv1lh6wj9k 3 ай бұрын
cloud u give me your font settings? Thanks!
@aloshy7717
@aloshy7717 Жыл бұрын
Not getting how to handle multiple custom exceptions
@prosenjitdutta2026
@prosenjitdutta2026 Жыл бұрын
Video quality not good.
@Javatechie
@Javatechie Жыл бұрын
Hello buddy apologies for this please increase the resolution. Since this is the old video resolution Ava up to 720 HD. All recent videos are available in 4k
@botyironcastle
@botyironcastle 5 ай бұрын
this shows how slow working with java is
@Javatechie
@Javatechie 5 ай бұрын
It looks like you are not much aware about benefits of java please check pros and cons of it
Unveiling my winning secret to defeating Maxim!😎| Free Fire Official
00:14
Garena Free Fire Global
Рет қаралды 17 МЛН
女孩妒忌小丑女? #小丑#shorts
00:34
好人小丑
Рет қаралды 99 МЛН
У ГОРДЕЯ ПОЖАР в ОФИСЕ!
01:01
Дима Гордей
Рет қаралды 6 МЛН
Exception Handling in Spring Boot REST API Explained With Demonstration
28:05
Spring Boot Tutorial | How To Handle Exceptions
14:11
Amigoscode
Рет қаралды 155 М.
Unveiling my winning secret to defeating Maxim!😎| Free Fire Official
00:14
Garena Free Fire Global
Рет қаралды 17 МЛН