aspectj-maven-plugin

@Tansactional and @Aspect ordering

落花浮王杯 提交于 2019-12-03 15:04:22
问题 I would like to execute my code just before @Transactional transaction is started. @Aspect @Order(Ordered.HIGHEST_PRECEDENCE) //@Order(Ordered.LOWEST_PRECEDENCE) public class SynchronizerAspect { @Pointcut("execution(public * xxx.xxx.services.*.*(..))") private void anyServiceOperation() { } @Around("anyServiceOperation()") public Object synchronizerAdvice(ProceedingJoinPoint joinPoint) throws Throwable { System.out.println("Synchronizing : " + joinPoint.getSignature().getName()); return

How to force compile error with aspectJ pointcut mismatch

若如初见. 提交于 2019-12-01 13:19:18
I have the following aspectJ pointcut: @Around(value="execution(* *(*,Map<String, Object>)) && @annotation(com.xxx.annotations.MyCustomAnnotation)") As you can see, this pointcut only matches methods, annotated with com.xxx.annotations.MyCustomAnnotation, which have 2 arguments - the first one is arbitrary and the second one must be of type Map<String, Object> . Is there a way to configure the aspectj-maven-plugin to force compilation errors if it find methods that are annotated with com.xxx.annotations.MyCustomAnnotation, but don't match the signature * *(*,Map<String, Object>) ? Or in other

AspectJ + Junit + Maven - pointcut recognized in tests but NoSuchMethodError: aspectOf() exception thrown

孤街醉人 提交于 2019-11-30 08:53:06
I have followed almost all JUnit + Maven + AspectJ questions here and even I am pretty sure I have everything set properly, I am unable to test it. I have a Maven module with just one aspect: @Aspect public class AssertionAspect { @Pointcut("execution(@org.junit.Test * *())") public void testMethodEntryPoint() {} @Before("testMethodEntryPoint()") public void executeBeforeEnteringTestMethod() { System.out.println("EXECUTE ACTION BEFORE ENTERING TEST METHOD"); } @After("testMethodEntryPoint()") public void executeAfterEnteringTestMethod() { System.out.println("EXECUTE ACTION AFTER ENTERING TEST

Spring + AspectJ weaving for java 8 using aspectj-maven-plugin

梦想与她 提交于 2019-11-27 12:50:00
I'm migrating my project from java 7 to java 8 and the problem I have is related to aspectj weaving using aspectj-maven-plugin . I could configure successfuly the weaving using this plugin running on Java 6 and 7 according to Haus documentation . But the problem is that I haven't found any way to use (and find) plugin version 7 that supports java 8. I saw here that plugin 7 adds java 8 support but couldn't find a way to use it. This is the configuration plugin I need: <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>aspectj-maven-plugin</artifactId> <version>1.7</version> <!-- AspectJ

error upgrading aspectj-maven-plugin v1.8

妖精的绣舞 提交于 2019-11-26 20:12:19
问题 Upgrading the maven plugin from 1.7 to 1.8 results in the following error message: [ERROR] 'dependencies.dependency.systemPath' for com.sun:tools:jar must specify an absolute path but is ${toolsjarSystemPath} @ pom.xml /ash-domain line 1 回答1: I had the same problem and I've just added in eclipse.ini the path to the JDK8. In my case: -vm C:\Program Files (x86)\Java\jdk1.8.0_60\bin\javaw.exe (must be before -vmargs) 回答2: I found a problem in AspectJ Maven plugin and fixed it. My pull request

Spring + AspectJ weaving for java 8 using aspectj-maven-plugin

a 夏天 提交于 2019-11-26 16:10:41
问题 I'm migrating my project from java 7 to java 8 and the problem I have is related to aspectj weaving using aspectj-maven-plugin . I could configure successfuly the weaving using this plugin running on Java 6 and 7 according to Haus documentation. But the problem is that I haven't found any way to use (and find) plugin version 7 that supports java 8. I saw here that plugin 7 adds java 8 support but couldn't find a way to use it. This is the configuration plugin I need: <plugin> <groupId>org