Skip to content

Commit

Permalink
feat: #16 코드 리뷰 반영
Browse files Browse the repository at this point in the history
  • Loading branch information
sominyun committed Mar 4, 2024
1 parent 9cdff4e commit 398d27c
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
@Slf4j
@Service
@RequiredArgsConstructor
@Transactional(readOnly = true)
public class ProductServiceImpl implements ProductService {

private final ProductRepository productRepository;
Expand All @@ -31,7 +30,6 @@ public class ProductServiceImpl implements ProductService {
@Override
@Transactional
public ProductResponse createProduct(CreateProductRequest request) {
log.info("productservice 들어옴");
Product product = Product.builder()
.company(request.company())
.brand(request.brand())
Expand Down Expand Up @@ -93,7 +91,7 @@ public ProductResponse createProduct(CreateProductRequest request) {
}

@Override
@Transactional
@Transactional(readOnly = true)
public ProductResponse getProduct(Long productId) {
Product product = productRepository.findById(productId)
.orElseThrow();
Expand All @@ -106,7 +104,7 @@ public ProductResponse getProduct(Long productId) {
}

@Override
@Transactional
@Transactional(readOnly = true)
public List<ProductResponse> getAllProduct() {
List<Product> products = productRepository.findAll();
List<ProductResponse> productResponses = new ArrayList<>();
Expand Down

0 comments on commit 398d27c

Please sign in to comment.