【发布时间】:2020-01-16 09:29:51
【问题描述】:
我使用 joda DateTime 作为参数。
在spring REST中对请求查询参数使用自定义日期时间格式
我已尝试使用 @DateTimeFormat 注释。
我已尝试使用自定义转换器。
@GetMapping("/users/time")
public ResponseEntity<User> findByTimeRange(final DateTime from, final DateTime to) {
}
Spring REST 仅支持 "2019-09-01T7:32:56.235-05:30" 但我想使用 "2019-09-01T7:32:56"
【问题讨论】:
-
那是哪个
DateTime类型? Joda-Time 的那个? -
是的,时间到了
标签: java spring rest spring-mvc postman