my configuration class:
Код: Выделить всё
@Configuration
@EnableLoadTimeWeaving(aspectjWeaving = EnableLoadTimeWeaving.AspectJWeaving.ENABLED)
public class AspectJWeaverConfiguration {}
Код: Выделить всё
< /code>
Мой аспект класс: < /p>
@Aspect
public class LoadTimeWeavingAspect {
@Around("within(project.base.package..*)")
public Object around(final ProceedingJoinPoint pjp) throws Throwable {
Method method = ((MethodSignature) pjp.getSignature()).getMethod();
PerformanceWatcher.start(method.getDeclaringClass().getName() + "." + method.getName());
try {
return pjp.proceed();
} finally {
PerformanceWatcher.stop();
}
}
}
Код: Выделить всё
org.springframework.boot
spring-boot-starter-aop
org.springframework
spring-instrument
${spring-instrument.version}
org.springframework.boot
spring-boot-starter-test
org.springframework.boot
spring-boot-starter-actuator
io.micrometer
micrometer-tracing-bridge-otel
${micrometer-tracing.version}
Как идея, чтобы сделать это? Было сложно найти документацию, чтобы руководить мне. />[*]https://www.credera.com/en-us/insights/ ... me-weaving
Подробнее здесь: https://stackoverflow.com/questions/796 ... oderror-as