Skip to content

Commit

Permalink
[Feat] Transactional 추가 #60
Browse files Browse the repository at this point in the history
  • Loading branch information
NARUBROWN committed Sep 30, 2024
1 parent 6d19f8f commit ef54737
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public MemberResponseDto getMember(Long id) {
return MemberResponseDto.entityToDto(member);
}

@Transactional
public MemberResponseDto saveMember(MemberRequestDto memberRequestDto) {
Member member = new Member(memberRequestDto);
Member savedMember = memberRepository.save(member);
Expand All @@ -50,6 +51,7 @@ public List<MemberResponseDto> findAllMember() {
.collect(Collectors.toList());
}

@Transactional
public CommonResponseDto deleteMember(Long id) {
Member found_member = memberRepository.findById(id).orElseThrow(() -> new CustomNotFoundException("The requested ID was not found."));
ArrayList<Group> found_group = groupRepository.findAllByMember(found_member);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public RoleResponseDto getRole(Long id) {
.build();
}

@Transactional
public RoleResponseDto saveRole(RoleRequestDto roleRequestDto) {
Role role = new Role(roleRequestDto);
Role savedRole = roleRepository.save(role);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package server.inuappcenter.kr.service.boardService;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import server.inuappcenter.kr.data.dto.response.BoardResponseDto;
Expand All @@ -13,7 +11,6 @@

@Component
public class AdditionalBoardStrategyProviderImpl implements AdditionalBoardStrategyProvider {
private static final Logger log = LoggerFactory.getLogger(AdditionalBoardStrategyProviderImpl.class);
private final Map<String, AdditionalBoardService> boardStrategyMap;

@Autowired
Expand All @@ -35,7 +32,6 @@ public List<BoardResponseDto> findBoardList(String boardName, String topic) {

@Override
public List<BoardResponseDto> findBoardList(String boardName) {
log.info("getTest");
AdditionalBoardService additionalBoardService = boardStrategyMap.get(boardName.toLowerCase());
System.out.println(additionalBoardService.getClass().getSimpleName());
return additionalBoardService.findBoardList(null);
Expand Down

0 comments on commit ef54737

Please sign in to comment.