title: spring annotation manage pojo
body: <p>I use spring annotation to manage java bean, use @service in service layer, and @autowired when inject service, but now I have a question, how to manage POJO by spring?</p>
  
  <p>for example, I need to return a user for ajax call, so I need to always write like:</p>
  
  <pre><code>User user = new User()......
  return user;
  </code></pre>
  
  <p>So, how I can use like </p>
  
  <pre><code>@autowired User user;
  </code></pre>
  
  <p>And the User POJO will be:</p>
  
  <pre><code>@component
  @scope("prototype")
  public class User{}
  </code></pre>
  
  <p>so each time the user entity will be a new one, and I needn't to new it everytime,
  But I failed to write like this, so can spring manage POJO to be a prototype?</p>
  
  <p>Update====================================
  Thanks for answering</p>