memberRepository.findById(member.getId());
// ctrl+alt+V
Optional<Member> byId = memberRepository.findById(member.getId());
public List<Member> findAll() {
List<Member> result = em.createQuery("select m from Member m", Member.class)
.getResultList();
return result;
//단축키 적용후
public List<Member> findAll() {
return em.createQuery("select m from Member m", Member.class)
.getResultList();
출처: 스프링 입문 - 김영한