title: Spring @Async annotation causes java.io.NotSerializableException?
body: <p>I need to create an asynchronized process with Spring, but when I put <code>@Async</code> on my method I get this error</p>
  
  <pre><code>java.io.NotSerializableException: org.springframework.aop.interceptor.AsyncExecutionInterceptor
      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1164)
      at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
      at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
      at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
  </code></pre>
  
  <p>I have this example, but it does not work:</p>
  
  <pre><code>@Autowired
  private IServicioClienteAsync servicioClienteAsync;
  
  public void prueba() {
      //testAsync();
      servicioClienteAsync.crearCliente();
  }
  </code></pre>
  
  <p>and </p>
  
  <pre><code>@Service(value = "servicioClienteAsync")
  public class ServicioClienteAsync implements Serializable, IServicioClienteAsync {
  
    @Autowired
    private WServiceCliente wServiceCliente;
  
    @Override
    public void crearCliente() {        
        wServiceCliente.test("wiiii");        
    }
  }
  </code></pre>
  
  <p>and</p>
  
  <pre><code>@Component
  public class WServiceCliente{
  
    @Async
    public void test(String name) {
        System.out.println("init ");
        try {
            Thread.sleep(5000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("finish");
    }
  }
  </code></pre>