Query by Boolean properties in spring-data-jpa without using method parameters

后端 未结 2 471
南笙
南笙 2020-12-28 11:16

Is it possible to query by Boolean properties in Spring Data JPA without using method parameters?

Basically I would like this to work without using custom @Query ann

2条回答
  •  轮回少年
    2020-12-28 11:57

    The @Query anotation can even be skipped. So it should just work just like this:

    public Iterable findByEnabledTrue();
    

提交回复
热议问题