I am working with Spring 4 AOP and right now, i have my ProxyFactoryBean configured like this:
@Bean
@Primary
public ProxyFactoryBean proxyFactoryBean() {
ProxyFactoryBean proxyFactoryBean = new ProxyFactoryBean();
proxyFactoryBean.setTarget(new ClientService());
proxyFactoryBean.addAdvice(new LoggingAdvice());
proxyFactoryBean.addAdvice(new DebugInterceptor());
return proxyFactoryBean;
}
This works, but the target is just the ClientService object.
Is it possible to set many targets and not just one ? I want to set those advices to an entire package, if it is possible. Otherwise, set specifics targets, but again, not just one. How could you do that ? Thanks in advance