Fix pointcut for async controllers
We need @within (not @target) to capture method executions inside annotated controllers. With @target all beans with methods returning Callable get wrapped in case at runtime there is a target match.
This commit is contained in:
@@ -17,8 +17,8 @@
|
||||
package org.springframework.cloud.sleuth;
|
||||
|
||||
import lombok.extern.apachecommons.CommonsLog;
|
||||
|
||||
import org.springframework.core.NamedThreadLocal;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* @author Spencer Gibb
|
||||
|
||||
@@ -64,11 +64,11 @@ public class TraceWebAspect {
|
||||
this.trace = trace;
|
||||
}
|
||||
|
||||
@Pointcut("@target(org.springframework.web.bind.annotation.RestController)")
|
||||
@Pointcut("@within(org.springframework.web.bind.annotation.RestController)")
|
||||
private void anyRestControllerAnnotated() {
|
||||
}
|
||||
|
||||
@Pointcut("@target(org.springframework.stereotype.Controller)")
|
||||
@Pointcut("@within(org.springframework.stereotype.Controller)")
|
||||
private void anyControllerAnnotated() {
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user