Spring AOP :- Passing method parameters dynamically to advice
<p>My ServiceImpl class contains multiple methods.I have one LoggingAspect and i want to dynamically pass the method parameters to an advice based on the method called in the ServiceImpl. how do i acheive this?In the below code my method has 4 parameters,but one of my other method has 5 parametres and the third has 3.So how do i pass parameters dynamically based on number of method parameters? </p>

<pre><code>@Aspect
public class LoggingAspect {

@Before("allGenericAppServiceImplMethods(userid,galleryId,sid,imageName)")
public void LoggingAdvice(JoinPoint joinPoint,String userid,String     galleryId,String sid,String imageName){
System.out.println("String values are "+userid+" "+sid+" "+galleryId+" "+imageName);
}

@Pointcut("execution(public * com.nrollup.service.impl.GenericAppServiceImpl.*(..)) &amp;&amp; args(userid,galleryId,sid,imageName)")
public void allGenericAppServiceImplMethods(String userid,String galleryId,String sid,String imageName)
{
}

}
</code></pre>