Skip to content

Commit

Permalink
refactor :: 어노테이션 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
ta2ye0n committed Apr 7, 2024
1 parent df3cb19 commit 587f03f
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@
import com.mindway.server.v2.domain.auth.service.LogoutService;
import com.mindway.server.v2.domain.user.entity.User;
import com.mindway.server.v2.domain.user.util.UserUtil;
import com.mindway.server.v2.global.annotation.ServiceWithTransaction;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional(rollbackFor = {Exception.class})
@RequiredArgsConstructor
@ServiceWithTransaction
public class LogoutServiceImpl implements LogoutService {

private final RefreshRepository refreshRepository;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,12 @@
import com.mindway.server.v2.domain.auth.service.ReissueTokenService;
import com.mindway.server.v2.domain.user.entity.User;
import com.mindway.server.v2.domain.user.repository.UserRepository;
import com.mindway.server.v2.global.annotation.ServiceWithTransaction;
import com.mindway.server.v2.global.security.jwt.JwtProvider;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional(rollbackFor = {Exception.class})
@RequiredArgsConstructor
@ServiceWithTransaction
public class ReissueTokenServiceImpl implements ReissueTokenService {

private final JwtProvider jwtProvider;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import com.mindway.server.v2.domain.user.entity.User;
import com.mindway.server.v2.domain.user.entity.StudentNum;
import com.mindway.server.v2.domain.user.repository.UserRepository;
import com.mindway.server.v2.global.annotation.ServiceWithTransaction;
import com.mindway.server.v2.global.security.jwt.JwtProvider;
import gauth.GAuth;
import gauth.GAuthToken;
Expand All @@ -17,15 +18,12 @@
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.io.IOException;
import java.util.UUID;

@Service
@RequiredArgsConstructor
@Transactional(rollbackFor = {Exception.class})
@ServiceWithTransaction
@Slf4j
public class SignInServiceImpl implements SignInService {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@
import com.mindway.server.v2.domain.order.util.OrdersConverter;
import com.mindway.server.v2.domain.user.entity.User;
import com.mindway.server.v2.domain.user.util.UserUtil;
import com.mindway.server.v2.global.annotation.ServiceWithTransaction;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@RequiredArgsConstructor
@Transactional(rollbackFor = {Exception.class})
@ServiceWithTransaction
public class BookRequestServiceImpl implements BookRequestService {

private final UserUtil userUtil;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@
import com.mindway.server.v2.domain.user.entity.Authority;
import com.mindway.server.v2.domain.user.entity.User;
import com.mindway.server.v2.domain.user.util.UserUtil;
import com.mindway.server.v2.global.annotation.ServiceWithTransaction;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@RequiredArgsConstructor
@Transactional(rollbackFor = {Exception.class})
@ServiceWithTransaction
public class DeleteBookOrderServiceImpl implements DeleteBookOrderService {
private final OrdersRepository ordersRepository;
private final UserUtil userUtil;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,14 @@
import com.mindway.server.v2.domain.user.entity.Authority;
import com.mindway.server.v2.domain.user.entity.User;
import com.mindway.server.v2.domain.user.util.UserUtil;
import com.mindway.server.v2.global.annotation.ServiceWithReadOnlyTransaction;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.stream.Collectors;

@Service
@RequiredArgsConstructor
@Transactional(readOnly = true, rollbackFor = {Exception.class})
@ServiceWithReadOnlyTransaction
public class GetBookOrdersServiceImpl implements GetBookOrdersService {
private final UserUtil userUtil;
private final OrdersRepository ordersRepository;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@
import com.mindway.server.v2.domain.order.service.UpdateBookOrderService;
import com.mindway.server.v2.domain.user.entity.User;
import com.mindway.server.v2.domain.user.util.UserUtil;
import com.mindway.server.v2.global.annotation.ServiceWithTransaction;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@RequiredArgsConstructor
@Transactional(rollbackFor = {Exception.class})
@ServiceWithTransaction
public class UpdateBookOrderServiceImpl implements UpdateBookOrderService {
private final UserUtil userUtil;
private final OrdersRepository ordersRepository;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,14 @@
import com.mindway.server.v2.domain.user.presentation.dto.response.MyOrdersResponse;
import com.mindway.server.v2.domain.user.service.GetMyOrdersService;
import com.mindway.server.v2.domain.user.util.UserUtil;
import com.mindway.server.v2.global.annotation.ServiceWithReadOnlyTransaction;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.stream.Collectors;

@Service
@RequiredArgsConstructor
@Transactional(readOnly = true, rollbackFor = {Exception.class})
@ServiceWithReadOnlyTransaction
public class GetMyOrdersServiceImpl implements GetMyOrdersService {

private final UserUtil userUtil;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@
import com.mindway.server.v2.domain.user.presentation.dto.response.UserInfoResponse;
import com.mindway.server.v2.domain.user.service.UserInfoService;
import com.mindway.server.v2.domain.user.util.UserUtil;
import com.mindway.server.v2.global.annotation.ServiceWithReadOnlyTransaction;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@RequiredArgsConstructor
@Transactional(readOnly = true, rollbackFor = {Exception.class})
@ServiceWithReadOnlyTransaction
public class UserInfoServiceImpl implements UserInfoService {

private final UserUtil userUtil;
Expand Down

0 comments on commit 587f03f

Please sign in to comment.