1
У меня есть интерфейсCDI-перехватчик: Получить параметров от перехвачены Метод
@InterceptorBinding
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.METHOD, ElementType.TYPE })
public @interface LoggingInterceptorBinding {
}
и класс:
@LoggingInterceptorBinding
@Interceptor
public class LoggingInterceptor implements Serializable {
@AroundInvoke
public Object onMethodCall(InvocationContext context) throws Exception {
try {
System.out.println("Log before Method");
return context.proceed();
} finally {
System.out.println("Log after Method");
}
}
и ä аннотированных метод:
@LoggingInterceptorBinding
public void sayHello(String name)
Можно ли получить параметр «имя» от sayHello в перехватчиках «onMethodCalls» -метод?