Se produce un error al configurar las anotaciones de AOP en Spring. Por favor, dame algún consejo.
Esta es la clase de prueba empresarial:
paquete aop.annotation.service
import org. springframework.context.annotation. Alcance;
importar org.springframework.stereotype.Service
@Service("deptSerivceImpl")
@Service("deptSerivceImpl) ")
@Service("deptSerivceImpl")
@Service("deptSerivceImpl")
paquete aop.annotation.aspect;
importar org.aspectj.lang.ProceedingJoinPoint;
importar org.aspectj.lang.annotation.Around;
importar org.aspectj.lang.ProceedingJoinPoint;
importar org.aspectj.lang.ProceedingJoinPoint;
importar org.aspectj.lang.annotation.Around;
@Around("myPointCut()")
public Object handerTime(ProceedingJoinPoint pjp){
prueba {
// Iniciar el reloj
StopWatch watch= new StopWatch(pjp.getTarget().getClass ().getName() );
watch.start(pjp.getSignature().getName()
Objeto obj=pjp.proceed()
;// Detener el reloj
watch.stop();
System.out.println(watch.prettyPrint());
return obj;
} catch (Throwable e) {
// TODO Bloque catch generado automáticamente
e.printStackTrace();
return null;
}//Objetivo de ejecución
}
}
}
}