周囲のアドバイスを持つポイントカットを作成しようとしています: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経由で外部ライブラリへのポイントカットを行うことはできませんか?
<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