0
我想使用內置的方法名稱查詢創建,例如:彈簧數據的JPA查詢名稱
public Person findByFirstName(String firstName);
但我想標記特定查詢「更新」的含義使用:
public Person findByFirstNameForUpdate(String firstName);
有沒有辦法讓它工作?我知道我可以創建一個新的存儲庫「PersonRepositoryForUpdate」,但我可以使用同一個存儲庫嗎?
謝謝,我知道我可以做到這一點,但有沒有辦法使用春季數據給出的自動查詢? – lior