MS Lesson25: AOP
1. Cross cutting concern - tetbiqin bir cox yerinde lazim olan, amma esas biznes mentiqine aid olmayan funksionalliq. Mes: loggin, security, audit. Sade misal: createOrder, pay, deleteUser - her biri ferqli biznes ishi gorur. Amma hamisinda eyni sheyler lazim ola biler. * log yazma, * icaze yoxlamaq, * vaxt olcmek, * tranzaksiya acmaq/baglamaq. Bunlar concern-dir (narahatliq/ehtiyac), biznesin ozu deyil. Spring Boot application ucun dependency: implementation 'org.springframework.boot:spring-boot-starter-aspectj' Log misali: package az.etibarli.demoaop.step1.aspect; import lombok.extern.slf4j. Slf4j ; import org.aspectj.lang.JoinPoint; import org.aspectj.lang.annotation. After ; import org.aspectj.lang.annotation. Aspect ; import org.aspectj.lang.annotation. Before ; import org.springframework.stereotype. Component ; @Slf4j @Aspect @Component public class LoggingAspect { @Before ( " execution(public * az.etibarli.demoaop.step1.service..*(..)) " ) public vo...