How to query LocalDateTime with LocalDate?

后端 未结 5 1186
一向
一向 2021-01-22 02:49

I\'ve got a class which contains an atttribute of java.time.LocalDateTime type.

public class MyClass{
    // ...
    private LocalDateTime fecha;
    // ...
}
         


        
5条回答
  •  广开言路
    2021-01-22 03:07

    I know that this one is a old issue, but for the future, who is with the same problem can use this solution:

     default void delByFecha(@RequestParam(name = "date") @DateTimeFormat(iso = ISO.DATE) LocalDate date)
    

    It's works perfectly!

提交回复
热议问题