I am trying to add @Required
Annotation to my bean but complier says it's deprecated.
public class Product {
private String id;
public String getId() {
return id;
}
@Required
public void setId(String id) {
this.id = id;
}
}
Is there a different annotation for this?