How to write aspects with Spring AOP [Spring AOP journey - Part 1]

Published: 15 September 2022
on channel: MJC
2,761
108

In this video you will learn what is AOP, how to write your aspects, how to use them with Spring and how to test them (with several options).
Everything you should know about Spring AOP to write your own aspect in single video!

Spring AOP journey:
Part 1: you are here
Part 2:    • How Spring AOP really works [Spring A...  
Part 3:    • Real examples of Spring AOP inside Sp...  

Timecodes:
00:00 - New topic - Spring AOP
01:02 - Example: logging of CongratulationService
01:24 - Solution 1: add logging logic as is
02:27 - Solution 2: add logging in utility methods and invoke it
04:48 - What is AOP? Spring AOP
06:57 - Solution 3: add logging with aspects with service name pointcut
14:10 - Solution 4: add logging with aspects with marker annotation
18:17 - Exclusive lock aspect (aspect ordering, autowiring into aspects)
23:15 - Publish result aspect (programmatically write pointcuts and advice)
30:18 - Testing Spring AOP: test AOP logic only with mocks
31:38 - Testing Spring AOP: test AOP and "business" logic with application context
33:07 - Testing Spring AOP: test AOP and "business" logic with AspectJProxyFactory
35:13 - Testing Spring AOP: test AOP and "business" logic with ProxyFactory
37:50 - You're ready to write your aspects!

Code from the video: https://github.com/LutherWest/how-doe...
____
Subscribe to our media network:
Instagram:   / mjc.talks  
MJC Telegram Chat: https://t.me/mjctalks
Community page: https://mjc.by
Facebook:   / 393447772538328  
TikTok   / mjc.talks  


Watch video How to write aspects with Spring AOP [Spring AOP journey - Part 1] online without registration, duration hours minute second in high quality. This video was added by user MJC 15 September 2022, don't forget to share it with your friends and acquaintances, it has been viewed on our site 2,761 once and liked it 108 people.