Spring Boot AOP Implementation with examples Part-2 | Interview Questions and Answers | Code Decode
ฝัง
- เผยแพร่เมื่อ 15 ต.ค. 2024
- In this video of code decode aop spring boot example interview questions. We have explained aop with example and interview questions.
Spring boot AOP Part - 1 : • Spring Boot AOP Implem...
What is AOP?
Aspect Oriented Programming (AOP) is a programming paradigm aiming to segregate cross-cutting functionalities, such as logging, from business logic in an application
Spring boot application mainly divided in to three layers:
Web Layer for exposing the services using RESTFul web services.
Business layer to handle business logic.
Data Layer for data persistence logic.
Each layer is having different responsibility and there are some common aspects which gets apply to all layers. e.g. Logging, Security, Validation, etc. Common aspects are also called as cross-cutting concerns.
Spring AOP has interceptors which can intercept application and its methods.
What are AOP Terminologies?
Aspect
Aspect is a class in which we define Pointcuts and Advices.
Advice
It’s the behavior that addresses system-wide concerns (logging, security checks, etc…). This behavior is represented by a method to be executed at a JoinPoint. This behavior can be executed Before, After, or Around the JoinPoint according to the Advice type as we will see later.
Pointcut
A Pointcut is an expression that defines at what JoinPoints a given Advice should be applied.
JoinPoint
Simply put, a JoinPoint is a point in the execution flow of a method where an Aspect (new behavior) can be plugged in.
What are Types of advices in aspectj AOP?
@Before : Advice that executes before a join point, but which does not have the ability to prevent execution flow proceeding to the join point (unless it throws an exception).
@AfterReturning : Advice to be executed after a join point completes normally.
@AfterThrowing : Advice to be executed if a method exits by throwing an exception.
@After : Advice to be executed regardless of the means by which a join point exits (normal or exceptional return).
Subscribe now and stay ahead in the world of Java and Spring Boot!
Most Asked Core Java Interview Questions and Answers: • Core Java frequently a...
Advance Java Interview Questions and Answers: • Advance Java Interview...
Java 8 Interview Questions and Answers: • Java 8 Interview Quest...
Hibernate Interview Questions and Answers:
• Hibernate Interview Qu...
Spring Boot Interview Questions and Answers:
• Advance Java Interview...
Angular Playlist: • Angular Course Introdu...
SQL Playlist: • SQL Interview Question...
GIT: • GIT
Subscriber and Follow Code Decode
Subscriber Code Decode: www.youtube.co...
LinkedIn : / codedecodeyoutube
Instagram: / codedecode25
#aop #springboot #codedecode
@CodeDecode - This was one of the best AOP tutorials i have came across. Thank you so much for sharing this tutorials and interview perp. material.
Thanks Manish 🙂
Thanks! Hi Code Decode, I am restarting my career after almost 7 year of gap. Thanks you so much, your videos were very helpful. You are a great teacher. Keep helping us. Once again thank you so much
Thanks Divya. We have launched our course too today. It will be helpful for you. Please participate in our free course give away. Add your name in the form as soon as possible.
Your channel deserves more than 1M subscribers
Thanks for the support
Much helpful video
I have my interview tomorrow!!
All the very best for the interview Sagar
Please continue this series. Thank you so much!
Thanks 👍
Indeed the best tutorials for spring AOP. Thank you for explaining so clearly. After watching the video there is no need to even take down notes, concepts are edged into the mind. Please continue for part-3 of the AOP series, the @Around.
Thanks a lot Someshu . I think we already have it. Don't we
Always nice and simple strategy to explain concepts ..always prefer to learn from this platform..awesome teaching ❤
Thanks Vidya❤️
Excellent Content ! I tried all 3 videos and it worked very well !
Thank you so much for elucidating the concept ..
Great video for AOP
Hi mam, all your videos are super, I have one doubt, how we will maintain session from one microservice to another microservice while calling through rest template? Very much needed answer mam? Similarly how we are maintaining transaction from one microservice to another microservice?
Hi, Thanks for the explanation it is so much clear when you explain.
I have one doubt whatb do you use for line by line debugging in this video?
Please continue this series next parts
Sure Vithal 👍😊
As usual the best and precise needed content. Waiting for the next video.
Thanks for the tutorials.
I am getting Nullpointerexception from Service when using Aspect. Any pointers?
Hi Mam,
what is the use of Log4j if we can use AOP. or it can be said AOP is replacement of Log4j.
Please make 3rd part of AOP remaining concepts
Sure
good
Thanks
Hi
In case of some more logging in the controller and service side ex- I have 30 lines of code and I put log after lines 10,20 and 25 - How AOP will use in this case. I want to print log after line10,20 and 25.
Same doubt
Thank you again
🙂🙂👍👍
👌
👍👍
please add subtitle
For English ?