I have a following requirement for my spring boot application.
- For example I have class :
@Data
class Ticket {
private String id;
private String description;
private TimePeriod validity;
}
@Data
class TimePeriod {
private OffsetDateTime issueDate;
private OffsetDateTime endDate;
}
-
Given updatableData property which specifies, fields that are updatable (in case of update operation) on Ticket resource.
updatableData="Ticket.description,Ticket.validity.*"
where validity.* means all the fields for property TimePeriod in Ticket are updatable. ( like a wildcard ).
=> what are some better options to achieve this requirement ?
=> does this fall under use case of Spring Expression language ?
Note: My first thought was using java reflection for this purpose.
Aucun commentaire:
Enregistrer un commentaire