I am trying to write an Aspect, trying to implement Pointcut's if() condition but receiving ArrayIndexOutOfBoundsException. here is the code snippet.
@Pointcut("call(* com.aop.Service.activate(..)) && args(iActivate,..) && if()")
public static boolean saveActivate(Activate iActivate) {
return true; //if false @before she not be invoked
};
@Before("saveActivate(iActivate)")
public void saveActivateBefore(JoinPoint ijoinPoint, ActivateInstallmentRequest iActivateInstallmentRequest) {
System.out.println("Log from @before");
}
This code is giving me below exception:
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'objectMapperConfigurer' defined in class path resource [springfox/documentation/spring/web/SpringfoxWebMvcConfiguration.class]: Initialization of bean failed; nested exception is java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
Can Someone help me what I'm missing here? PS: I have also referred AspectJ.