Spring data JPA custom repository, how apply logic

前端 未结 2 680
你的背包
你的背包 2021-01-21 17:55

I try to implement a JPA custom repository.

I have a filter object like this:

public class FilterPatient {
    private String surname;
    private String         


        
2条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-21 18:13

    You have a lot of built-in ways to create custom queries, for example findByNameAndSurname will work without the @Query annotation..

    http://docs.spring.io/spring-data/jpa/docs/1.3.0.RELEASE/reference/html/jpa.repositories.html#jpa.query-methods

提交回复
热议问题