title: How to hide annotated fields in Spring Boot using custom annotations?
body: <p>I have created custom annotations that I add to my Java class fields.
  When I create object of that class, I want my custom annotated fields to have value: null or "" or "customAnnotation"
  For example:</p>
  
  <pre><code>@Entity
  public class User implements Serializable{
  
  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  @Column(name = "address_id")
  private Long id;
  
  @MyCustomAnnotation
  private String firstname;
  
  private String lastname;
  ....
  </code></pre>
  
  <p>And when I create the object somewhere in the project:</p>
  
  <pre><code>User user = new User();
  user.setFirstname("John");
  user.setLastname("Smith");
  </code></pre>
  
  <p>I want it to be:</p>
  
  <pre><code>String firstname = user.getFirstname() // firstname is "" or null
  String lastname = user.getLastname()   // lastname is "Smith"
  </code></pre>
  
  <p>How to create method that will find all annotated fields in all classes in the project and do the same for all of them? Where to store this method?
  I am working on the Maven, Spring Boot project.</p>