Skip to content

Commit e7620a3

Browse files
committed
Feat: 지연로딩 초기화 해결
1 parent 8941fdf commit e7620a3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/cmf/commitField/domain/chat/chatRoom/service/ChatRoomServiceImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ private static List<ChatRoomDto> getChatRoomDtos(Page<ChatRoom> all) {
104104

105105
// 채팅방 전체 조회
106106
@Override
107-
// @Transactional(readOnly = true)
107+
@Transactional(readOnly = true)
108108
public List<ChatRoomDto> getRoomList(Pageable pageable) {
109109
Page<ChatRoom> all = chatRoomRepository.findAll(pageable);
110110
return getChatRoomDtos(all);
@@ -147,7 +147,7 @@ public List<ChatRoomDto> getRoomList(Pageable pageable) {
147147

148148
// 자신이 생성한 방 리스트 조회
149149
@Override
150-
//
150+
@Transactional(readOnly = true)
151151
public List<ChatRoomDto> getUserByRoomList(Long userId, Pageable pageable) {
152152
Page<ChatRoom> all = chatRoomRepository.findAllByUserId(userId, pageable);
153153
return getChatRoomDtos(all);

0 commit comments

Comments
 (0)