-
Notifications
You must be signed in to change notification settings - Fork 41.9k
Closed
Description
Given an endpoint with a LocalDate parameter :
public void doSth(@RequestParam @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate startDate) {
...
}I must set @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) everywhere I want to bind a LocalDate. This code is boilerplate so I defined a custom editor :
webDataBinder.registerCustomEditor(LocalDate.class, new LocalDateEditor());
But it would be great if spring boot was able to do this natively with a date format in the properties file, and ISO as default.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
type: enhancementA general enhancementA general enhancement