import org.springframework.transaction.annotation.Transactional;
@Transactional(readOnly = true)
public List<CrewChat> findAll(){
return crewChatRepository.findAllByOrderByCreatedAtAsc();
}
-> 플러시를 작동하지 않도록 해서 성능 향상
@QueryHints(@QueryHint(name = org.hibernate.annotations.QueryHints.READ_ONLY, value = "true"))
List<CrewChat> findAllByOrderByCreatedAtAsc();
-> 엔티티를 읽기 전용으로 조회해서 메모리 절약