Skip to content

Commit

Permalink
fix() : 게시물 조회 오류 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
dongkyun0713 committed Feb 28, 2024
1 parent 4587fbf commit 24f4ea1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
public class MatchingBoardService {
private final MatchingPostRepository matchingPostRepository;

@Transactional(readOnly = true)
@Transactional
public MatchingPostPagingResponseDto findAllPosts(int page) {
Pageable pageable = PageRequest.of(page, 10, Sort.by("createDate").descending());
Page<MatchingPost> matchingPosts = matchingPostRepository.findAll(pageable);
return MatchingPostPagingResponseDto.from(matchingPosts);
}

@Transactional(readOnly = true)
@Transactional
public MatchingPostPagingResponseDto searchByKeyWord(int page,
String keyword) {

Expand All @@ -33,7 +33,7 @@ public MatchingPostPagingResponseDto searchByKeyWord(int page,
return MatchingPostPagingResponseDto.from(matchingPosts);
}

@Transactional(readOnly = true)
@Transactional
public MatchingPostPagingResponseDto findByCategory(int page,
String category) {
Pageable pageable = PageRequest.of(page, 10, Sort.by("createDate").descending());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class MatchingPostService {
private final UserRepository userRepository;
private final MatchingPostReviewRepository matchingPostReviewRepository;

//게시물 작성
// 게시물 작성
@Transactional
public MatchingPostCreateResponseDto createMatchingPost(Principal principal,
MatchingPostCreateRequestDto matchingPostCreateRequestDto) {
Expand Down

0 comments on commit 24f4ea1

Please sign in to comment.