[Spring] 영속성 컨텍스트는

개요 @GetMapping(“/{userId}/followers”) public ResponseEntity<List<FollwerResponse>> getFollowers( @PathVariable(“userId”) Long userId, @PageableDefault(size = 10, sort = “userId”, direction = Direction.ASC) Pageable pageable ){ User user = userFindService.findById(userId); List<FollwerResponse> response = followService.getFollowers(user, pageable); return ResponseEntity.ok(response); } 프로젝트 코드를 검토하면서 위의 코드를 확인할 수 있었습니다. 교대 근무 중 @Transactional 주석이 사용되기 때문에 메서드 논리는 트랜잭션 내에서 작동합니다. Spring 컨테이너는 기본적으로 … Read more