Fixed error on AopConfiguration (#2946)
* com. to org. * changed all 'com.baeldung ' in 'org.baeldung' in order to make AopConfiguration class able to work
This commit is contained in:
parent
8e04a06bc9
commit
b4c327ea4f
|
@ -16,10 +16,10 @@ import java.time.Month;
|
||||||
@EnableAspectJAutoProxy
|
@EnableAspectJAutoProxy
|
||||||
public class AopConfiguration {
|
public class AopConfiguration {
|
||||||
|
|
||||||
@Pointcut("execution(public String com.baeldung.performancemonitor.PersonService.getFullName(..))")
|
@Pointcut("execution(public String org.baeldung.performancemonitor.PersonService.getFullName(..))")
|
||||||
public void monitor() { }
|
public void monitor() { }
|
||||||
|
|
||||||
@Pointcut("execution(public int com.baeldung.performancemonitor.PersonService.getAge(..))")
|
@Pointcut("execution(public int org.baeldung.performancemonitor.PersonService.getAge(..))")
|
||||||
public void myMonitor() { }
|
public void myMonitor() { }
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
|
@ -30,7 +30,7 @@ public class AopConfiguration {
|
||||||
@Bean
|
@Bean
|
||||||
public Advisor performanceMonitorAdvisor() {
|
public Advisor performanceMonitorAdvisor() {
|
||||||
AspectJExpressionPointcut pointcut = new AspectJExpressionPointcut();
|
AspectJExpressionPointcut pointcut = new AspectJExpressionPointcut();
|
||||||
pointcut.setExpression("com.baeldung.performancemonitor.AopConfiguration.monitor()");
|
pointcut.setExpression("org.baeldung.performancemonitor.AopConfiguration.monitor()");
|
||||||
return new DefaultPointcutAdvisor(pointcut, performanceMonitorInterceptor());
|
return new DefaultPointcutAdvisor(pointcut, performanceMonitorInterceptor());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ public class AopConfiguration {
|
||||||
@Bean
|
@Bean
|
||||||
public Advisor myPerformanceMonitorAdvisor() {
|
public Advisor myPerformanceMonitorAdvisor() {
|
||||||
AspectJExpressionPointcut pointcut = new AspectJExpressionPointcut();
|
AspectJExpressionPointcut pointcut = new AspectJExpressionPointcut();
|
||||||
pointcut.setExpression("com.baeldung.performancemonitor.AopConfiguration.myMonitor()");
|
pointcut.setExpression("org.baeldung.performancemonitor.AopConfiguration.myMonitor()");
|
||||||
return new DefaultPointcutAdvisor(pointcut, myPerformanceMonitorInterceptor());
|
return new DefaultPointcutAdvisor(pointcut, myPerformanceMonitorInterceptor());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue