Spring Boot使用JPA多条件查询mysql(3)
- UID
- 1066743
|
Spring Boot使用JPA多条件查询mysql(3)
新建实体相关的接口继承JpaSpecificationExecutor
QualityCheckRepository.java
代码如下:
package com.biologic.api.service;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Service;
import com.biologic.entity.QualityCheck;
@Service
public interface QualityCheckRepository extends JpaRepository<QualityCheck, Long>, JpaSpecificationExecutor<QualityCheck> {
} |
|
|
|
|
|