Use spring +aspectj in Spring boot

compile('org.springframework.boot:spring-boot-starter-aop')
compile('org.aspectj:aspectjrt')
compile('org.aspectj:aspectjweaver')
@SpringBootApplication
@EnableAspectJAutoProxy(proxyTargetClass=true)
public class YourApplication ...{
...
}
@Component
@Aspect
public class YourAspect {

	@Before("execution(public * com..*Manager.*(..))")
	public void doAdvice(JoinPoint joinPoint) {...}
	 
}

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.