around advice 주위에 pointcut을 작성하려고합니다 : com.fasterxml.jackson.databind.DeserializationContext.reportMappingException()
메소드입니다. Jackson DeserializationContext에 대한 AspectJ 포인트 컷 표현식 reportMappingException
이
내가 지금까지 무엇을하고 제대로 동작하지 않습니다 즉 받는다는 불평 :[WARNING] advice defined in com.charter.aesd.videocatalog.client.interceptor.ContactManagerLogger has not been applied [Xlint:adviceDidNotMatch]
/Users/rhasija/dev/projects/video/videocatalog-middle/client/src/main/java/com/charter/aesd/videocatalog/client/interceptor/ContactManagerLogger.java:36
시험 1 :
@Pointcut("execution(* com.fasterxml.jackson.databind.DeserializationContext+.*(..))")
public void servicePointcut() {}
시험 2 : 아래
@Pointcut("execution(* com.fasterxml.jackson.databind.*.*(..))")
public void servicePointcut() {}
내 치어입니다 .xml. AspectJ를 통해 외부 라이브러리에 대한 pointcut을 가질 수 없습니까?
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
</dependency>
....
</dependencies>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<version>1.10</version>
<configuration>
<complianceLevel>1.8</complianceLevel>
<source>1.8</source>
<target>1.8</target>
<includes>
<include>**/*.java</include>
<include>**/*.groovy</include>
</includes>
</configuration>
<executions>
<execution>
<phase>compile</phase>
<goals>
<!--suppress MavenModelInspection -->
<goal>compile</goal>
<!--suppress MavenModelInspection -->
<goal>test-compile</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.1</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>info.ponge.julien.hacks.guiceaspectj.Main</mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<!--suppress MavenModelInspection -->
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
[최소, 완료 및 확인 가능한 예제] (http://stackoverflow.com/help/mcve)는 어떻습니까? 예를 들어, 나는'ContactManagerLogger'와 Jackson을 호출하는 코드를 보지 못했습니다. POM 또한 불완전합니다. 잭슨 버전을 사용합니까? 절취하려는 메소드는 2.8 이후에만 사용할 수 있습니다. 많은 변수들, 나는 격렬하게 추측하고 싶지 않습니다. – kriegaex