Version: Spring Boot 2.3.2
I have the following simple TestController.
@RestController
@RequestMapping("/test")
public class TestController {
@Getter
protected static class TestObj {
@DurationUnit(ChronoUnit.MINUTES)
private Duration breakTime;
}
@GetMapping("/test")
public void test(@RequestBody TestObj test) {
System.out.println(test.getBreakTime());
}
}
With the following body...
... what I see in the console is
Obviously, conversion is not happening. It always default to SECONDS.