Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/jpa/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Spring boot 本机查询中的CUURENT_DATE()_Spring Boot_Jpa_Spring Data Jpa_Jpql_Eclipse Jee - Fatal编程技术网

Spring boot 本机查询中的CUURENT_DATE()

Spring boot 本机查询中的CUURENT_DATE(),spring-boot,jpa,spring-data-jpa,jpql,eclipse-jee,Spring Boot,Jpa,Spring Data Jpa,Jpql,Eclipse Jee,你好!family,我以前有一些东西,现在我在本地查询中使用当前日期,但执行后我什么都没有 @Query(value="select * from operation where date_operation = CURRENT_DATE()", nativeQuery =true) public Page<Operation> listByPageAndByMC(Pageable page); @Query(value=“select*from opera

你好!family,我以前有一些东西,现在我在本地查询中使用当前日期,但执行后我什么都没有

@Query(value="select * from operation where  date_operation  = CURRENT_DATE()", nativeQuery =true)
public Page<Operation> listByPageAndByMC(Pageable page);
@Query(value=“select*from operation,其中date\u operation=CURRENT\u date()”,nativeQuery=true)
公共页面列表ByPageandByMC(可分页页面);
运行后,在hibernate日志a中有以下内容: 休眠:选择*从操作,其中日期\操作=当前\日期()限制? 休眠:从操作中选择计数(*),其中日期操作=当前日期()

这是我的控制器

@RequestMapping(value="operations")
public String peration(Model model) {
    
    Page<Operation> ops = operationDao.listPageOp(1, 10);

    model.addAttribute("operation", ops);
 
@RequestMapping(value=“operations”)
公共字符串操作(模型){
页面操作=操作dao.listPageOp(1,10);
添加属性(“操作”,ops);
返回“操作/操作日”;
}


您的数据库中是否有当前日期的记录?是的,我的数据库中有许多数据