🔥 Spring AOP 与 Solon AOP 有什么区别?
Spring 和 Solon 作为容器型框架。都具有 IOC 和 AOP 的能力。其中: Spring AOP 使用表达式确定“切入点”,可以是某个注解(有侵入),可以是包名或类名或方法(无侵入) Solon AOP 只使用某个注解确定“切入点”(有侵入) 先看两个示例 1、Spring AOP 示例 Spring AOP 有很多不同的能力构建方式。此处采用更简洁的一种方式: import org.aspectj.lang.JoinPoint; import org.aspectj.lang.annotation.*; import org.springframework.stereotype.Component; @Aspect @Component public class LoggingAspect { @Pointcut("execution(* com.example.demo.service.*.*(..))") //也可以是某注解表达式 public void serviceLayer() {} @Around("serviceLayer()"...
