【发布时间】:2013-12-16 09:44:47
【问题描述】:
我正在寻找一种方法来重载我的 jpa 存储库中的多个查询。
例如我想要“常规”:public Player findPlayerById(Long Id);
还有:
@Lock(LockModeType.PESSIMISTIC_WRITE)
public Player findPlayerById(Long Id);
我发现了这个:How to add custom method to Spring Data JPA 但我认为这与我的情况无关。 我考虑过使用锁定注释创建 PlayerRepositoryPessimestic。
有没有办法使用同一个存储库?
【问题讨论】:
标签: java spring hibernate jpa spring-data-jpa