[스프링 부트 어드민 페이지] 4. QueryMethod
Github 코드 QueryMethod QueryMethod란 JPARepository 메서드가 findAll(), findById(), save() 등 정형화 되어있는데 커스터마이징 하여 원하는 WHERE절 조건 데이터를 입력해 데이터를 조회할 수 있는 메서드입니다. 1 2 3 4 5 6 7 8 9 10 @Repository public interface UserRepository extends JpaRepository { Optional findByAccount(String account); Optional findByEmail(String email); Optional findByAccountAndEmail(String account, String email); } Colored by Color S..
2021.05.17