I have problem with aspects. They don't firing. I have small aspect:
@Aspect
@Component
public class SynchronizingAspect {
@Pointcut("execution(public * *(..))")
@Around("synchronize() && @annotation(Synchronized)")
public void synchronize(ProceedingJoinPoint joinPoint) throws Throwable {
Logger.getGlobal().log(Level.SEVERE, "LOOOOOOOOL");
joinPoint.proceed();
}
}
and a method with annotation:
@Synchronized
@Transactional
@Override
public User create(Map<String, Object> values) {
return super.create(values);
}
in my config file I have
<aop:aspectj-autoproxy />
I'm using spring 4.1.5
and dependencies for aop:
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>1.6.11</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>1.6.11</version>
</dependency>
I will be very grateful if someone could tell me why it doesn't working and help me with fix it.
Best regards, Matt.
Aucun commentaire:
Enregistrer un commentaire