Skip to content

Commit

Permalink
[STYLE] change package structure
Browse files Browse the repository at this point in the history
  • Loading branch information
nogamsung committed Feb 3, 2024
1 parent c71c6f1 commit 54acd39
Show file tree
Hide file tree
Showing 68 changed files with 501 additions and 365 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.gabojait.gabojaitspring.api.controller.develop;

import com.gabojait.gabojaitspring.api.dto.common.response.DefaultNoResponse;
import com.gabojait.gabojaitspring.common.dto.response.DefaultNoResponse;
import com.gabojait.gabojaitspring.api.service.develop.DevelopService;
import com.gabojait.gabojaitspring.auth.JwtProvider;
import com.gabojait.gabojaitspring.config.auth.JwtProvider;
import com.gabojait.gabojaitspring.exception.CustomException;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package com.gabojait.gabojaitspring.api.controller.favorite;

import com.gabojait.gabojaitspring.api.dto.common.response.DefaultMultiResponse;
import com.gabojait.gabojaitspring.api.dto.common.response.DefaultNoResponse;
import com.gabojait.gabojaitspring.api.dto.common.response.PageData;
import com.gabojait.gabojaitspring.common.dto.response.DefaultMultiResponse;
import com.gabojait.gabojaitspring.common.dto.response.DefaultNoResponse;
import com.gabojait.gabojaitspring.common.dto.response.PageData;
import com.gabojait.gabojaitspring.api.dto.favorite.request.FavoriteUpdateRequest;
import com.gabojait.gabojaitspring.api.dto.favorite.response.FavoriteTeamPageResponse;
import com.gabojait.gabojaitspring.api.dto.favorite.response.FavoriteUserPageResponse;
import com.gabojait.gabojaitspring.api.service.favorite.FavoriteService;
import com.gabojait.gabojaitspring.auth.JwtProvider;
import com.gabojait.gabojaitspring.config.auth.JwtProvider;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.media.Content;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package com.gabojait.gabojaitspring.api.controller.notification;

import com.gabojait.gabojaitspring.api.dto.common.response.DefaultMultiResponse;
import com.gabojait.gabojaitspring.api.dto.common.response.DefaultNoResponse;
import com.gabojait.gabojaitspring.api.dto.common.response.PageData;
import com.gabojait.gabojaitspring.common.dto.response.DefaultMultiResponse;
import com.gabojait.gabojaitspring.common.dto.response.DefaultNoResponse;
import com.gabojait.gabojaitspring.common.dto.response.PageData;
import com.gabojait.gabojaitspring.api.dto.notification.response.NotificationPageResponse;
import com.gabojait.gabojaitspring.api.service.notification.NotificationService;
import com.gabojait.gabojaitspring.auth.JwtProvider;
import com.gabojait.gabojaitspring.config.auth.JwtProvider;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.media.Content;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package com.gabojait.gabojaitspring.api.controller.offer;

import com.gabojait.gabojaitspring.api.dto.common.response.DefaultMultiResponse;
import com.gabojait.gabojaitspring.api.dto.common.response.DefaultNoResponse;
import com.gabojait.gabojaitspring.api.dto.common.response.PageData;
import com.gabojait.gabojaitspring.common.dto.response.DefaultMultiResponse;
import com.gabojait.gabojaitspring.common.dto.response.DefaultNoResponse;
import com.gabojait.gabojaitspring.common.dto.response.PageData;
import com.gabojait.gabojaitspring.api.dto.offer.request.OfferCreateRequest;
import com.gabojait.gabojaitspring.api.dto.offer.request.OfferDecideRequest;
import com.gabojait.gabojaitspring.api.dto.offer.response.OfferPageResponse;
import com.gabojait.gabojaitspring.api.service.offer.OfferService;
import com.gabojait.gabojaitspring.auth.JwtProvider;
import com.gabojait.gabojaitspring.config.auth.JwtProvider;
import com.gabojait.gabojaitspring.domain.offer.OfferedBy;
import com.gabojait.gabojaitspring.domain.user.Position;
import io.swagger.annotations.Api;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package com.gabojait.gabojaitspring.api.controller.profile;

import com.gabojait.gabojaitspring.api.dto.common.response.DefaultMultiResponse;
import com.gabojait.gabojaitspring.api.dto.common.response.DefaultNoResponse;
import com.gabojait.gabojaitspring.api.dto.common.response.DefaultSingleResponse;
import com.gabojait.gabojaitspring.api.dto.common.response.PageData;
import com.gabojait.gabojaitspring.common.dto.response.DefaultMultiResponse;
import com.gabojait.gabojaitspring.common.dto.response.DefaultNoResponse;
import com.gabojait.gabojaitspring.common.dto.response.DefaultSingleResponse;
import com.gabojait.gabojaitspring.common.dto.response.PageData;
import com.gabojait.gabojaitspring.api.dto.profile.request.ProfileDescriptionRequest;
import com.gabojait.gabojaitspring.api.dto.profile.request.ProfileIsSeekRequest;
import com.gabojait.gabojaitspring.api.dto.profile.request.ProfileUpdateRequest;
import com.gabojait.gabojaitspring.api.dto.profile.response.*;
import com.gabojait.gabojaitspring.api.service.profile.ProfileService;
import com.gabojait.gabojaitspring.auth.JwtProvider;
import com.gabojait.gabojaitspring.config.auth.JwtProvider;
import com.gabojait.gabojaitspring.domain.user.Position;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
Expand All @@ -25,7 +25,6 @@
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import javax.validation.constraints.*;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package com.gabojait.gabojaitspring.api.controller.review;

import com.gabojait.gabojaitspring.api.dto.common.response.DefaultMultiResponse;
import com.gabojait.gabojaitspring.api.dto.common.response.DefaultNoResponse;
import com.gabojait.gabojaitspring.api.dto.common.response.DefaultSingleResponse;
import com.gabojait.gabojaitspring.api.dto.common.response.PageData;
import com.gabojait.gabojaitspring.common.dto.response.DefaultMultiResponse;
import com.gabojait.gabojaitspring.common.dto.response.DefaultNoResponse;
import com.gabojait.gabojaitspring.common.dto.response.DefaultSingleResponse;
import com.gabojait.gabojaitspring.common.dto.response.PageData;
import com.gabojait.gabojaitspring.api.dto.review.request.ReviewCreateManyRequest;
import com.gabojait.gabojaitspring.api.dto.review.response.ReviewFindAllTeamResponse;
import com.gabojait.gabojaitspring.api.dto.review.response.ReviewFindTeamResponse;
import com.gabojait.gabojaitspring.api.dto.review.response.ReviewPageResponse;
import com.gabojait.gabojaitspring.api.service.review.ReviewService;
import com.gabojait.gabojaitspring.auth.JwtProvider;
import com.gabojait.gabojaitspring.config.auth.JwtProvider;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.media.Content;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
package com.gabojait.gabojaitspring.api.controller.team;

import com.gabojait.gabojaitspring.api.dto.common.response.DefaultMultiResponse;
import com.gabojait.gabojaitspring.api.dto.common.response.DefaultNoResponse;
import com.gabojait.gabojaitspring.api.dto.common.response.DefaultSingleResponse;
import com.gabojait.gabojaitspring.api.dto.common.response.PageData;
import com.gabojait.gabojaitspring.common.dto.response.DefaultMultiResponse;
import com.gabojait.gabojaitspring.common.dto.response.DefaultNoResponse;
import com.gabojait.gabojaitspring.common.dto.response.DefaultSingleResponse;
import com.gabojait.gabojaitspring.common.dto.response.PageData;
import com.gabojait.gabojaitspring.api.dto.team.request.TeamCompleteRequest;
import com.gabojait.gabojaitspring.api.dto.team.request.TeamCreateRequest;
import com.gabojait.gabojaitspring.api.dto.team.request.TeamIsRecruitingUpdateRequest;
import com.gabojait.gabojaitspring.api.dto.team.request.TeamUpdateRequest;
import com.gabojait.gabojaitspring.api.dto.team.response.*;
import com.gabojait.gabojaitspring.api.service.team.TeamService;
import com.gabojait.gabojaitspring.auth.JwtProvider;
import com.gabojait.gabojaitspring.config.auth.JwtProvider;
import com.gabojait.gabojaitspring.domain.user.Position;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package com.gabojait.gabojaitspring.api.controller.user;

import com.gabojait.gabojaitspring.api.dto.common.response.DefaultNoResponse;
import com.gabojait.gabojaitspring.common.dto.response.DefaultNoResponse;
import com.gabojait.gabojaitspring.api.dto.user.request.ContactCreateRequest;
import com.gabojait.gabojaitspring.api.dto.user.request.ContactVerifyRequest;
import com.gabojait.gabojaitspring.api.service.user.ContactService;
import com.gabojait.gabojaitspring.domain.user.Contact;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.media.Content;
Expand All @@ -18,8 +17,6 @@

import javax.validation.Valid;

import java.util.Optional;

import static com.gabojait.gabojaitspring.common.code.SuccessCode.EMAIL_VERIFIED;
import static com.gabojait.gabojaitspring.common.code.SuccessCode.VERIFICATION_CODE_SENT;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package com.gabojait.gabojaitspring.api.controller.user;

import com.gabojait.gabojaitspring.api.dto.common.response.DefaultNoResponse;
import com.gabojait.gabojaitspring.api.dto.common.response.DefaultSingleResponse;
import com.gabojait.gabojaitspring.common.dto.response.DefaultNoResponse;
import com.gabojait.gabojaitspring.common.dto.response.DefaultSingleResponse;
import com.gabojait.gabojaitspring.api.dto.user.request.*;
import com.gabojait.gabojaitspring.api.dto.user.response.UserFindMyselfResponse;
import com.gabojait.gabojaitspring.api.dto.user.response.UserLoginResponse;
import com.gabojait.gabojaitspring.api.dto.user.response.UserRegisterResponse;
import com.gabojait.gabojaitspring.api.service.user.UserService;
import com.gabojait.gabojaitspring.auth.JwtProvider;
import com.gabojait.gabojaitspring.config.auth.JwtProvider;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.media.Content;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.gabojait.gabojaitspring.api.service.favorite;

import com.gabojait.gabojaitspring.api.dto.common.response.PageData;
import com.gabojait.gabojaitspring.common.dto.response.PageData;
import com.gabojait.gabojaitspring.api.dto.favorite.request.FavoriteUpdateRequest;
import com.gabojait.gabojaitspring.api.dto.favorite.response.FavoriteTeamPageResponse;
import com.gabojait.gabojaitspring.api.dto.favorite.response.FavoriteUserPageResponse;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.gabojait.gabojaitspring.api.service.notification;

import com.gabojait.gabojaitspring.api.dto.common.response.PageData;
import com.gabojait.gabojaitspring.common.dto.response.PageData;
import com.gabojait.gabojaitspring.api.dto.notification.response.NotificationPageResponse;
import com.gabojait.gabojaitspring.domain.notification.Notification;
import com.gabojait.gabojaitspring.domain.notification.NotificationType;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.gabojait.gabojaitspring.api.service.offer;

import com.gabojait.gabojaitspring.api.dto.common.response.PageData;
import com.gabojait.gabojaitspring.common.dto.response.PageData;
import com.gabojait.gabojaitspring.api.dto.offer.request.OfferCreateRequest;
import com.gabojait.gabojaitspring.api.dto.offer.request.OfferDecideRequest;
import com.gabojait.gabojaitspring.api.dto.offer.response.OfferPageResponse;
Expand All @@ -19,7 +19,6 @@
import com.gabojait.gabojaitspring.repository.team.TeamRepository;
import com.gabojait.gabojaitspring.repository.user.UserRepository;
import lombok.RequiredArgsConstructor;
import org.springframework.data.domain.Page;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.gabojait.gabojaitspring.api.service.profile;

import com.gabojait.gabojaitspring.api.dto.common.response.PageData;
import com.gabojait.gabojaitspring.common.dto.response.PageData;
import com.gabojait.gabojaitspring.api.dto.profile.request.*;
import com.gabojait.gabojaitspring.api.dto.profile.response.*;
import com.gabojait.gabojaitspring.api.vo.profile.ProfileVO;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.gabojait.gabojaitspring.api.service.review;

import com.gabojait.gabojaitspring.api.dto.common.response.PageData;
import com.gabojait.gabojaitspring.common.dto.response.PageData;
import com.gabojait.gabojaitspring.api.dto.review.request.ReviewCreateManyRequest;
import com.gabojait.gabojaitspring.api.dto.review.response.ReviewFindAllTeamResponse;
import com.gabojait.gabojaitspring.api.dto.review.response.ReviewFindTeamResponse;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.gabojait.gabojaitspring.api.service.team;

import com.gabojait.gabojaitspring.api.dto.common.response.PageData;
import com.gabojait.gabojaitspring.common.dto.response.PageData;
import com.gabojait.gabojaitspring.api.dto.team.request.TeamCreateRequest;
import com.gabojait.gabojaitspring.api.dto.team.request.TeamUpdateRequest;
import com.gabojait.gabojaitspring.api.dto.team.response.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.gabojait.gabojaitspring.auth;
package com.gabojait.gabojaitspring.api.service.user;

import com.gabojait.gabojaitspring.domain.user.User;
import com.gabojait.gabojaitspring.domain.user.UserRole;
Expand All @@ -8,7 +8,6 @@
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
Expand All @@ -21,27 +20,16 @@
@Service
@Transactional(readOnly = true)
@RequiredArgsConstructor
public class CustomUserDetailsService implements UserDetailsService {
public class UserDetailsService {

private final UserRoleRepository userRoleRepository;

@Override
public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
List<UserRole> userRoles = userRoleRepository.findAll(username);

User user = userRoles.stream()
.findFirst()
.orElseThrow(() -> new CustomException(USER_NOT_FOUND))
.getUser();
List<GrantedAuthority> grantedAuthorities = userRoles.stream()
.map(userRole -> new SimpleGrantedAuthority(userRole.getRole().name()))
.collect(Collectors.toList());

return new org.springframework.security.core.userdetails.User(user.getUsername(), user.getPassword(),
grantedAuthorities);
}

public UserDetails loadUserByUserId(long userId) throws UsernameNotFoundException {
/**
* 회원 상세 정보 조회 |
* @param userId 회원 식별자
* @return 회원 상세 정보
*/
public UserDetails findUserDetails(long userId) throws UsernameNotFoundException {
List<UserRole> userRoles = userRoleRepository.findAll(userId);

User user = userRoles.stream()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.gabojait.gabojaitspring.api.vo.profile;

import com.gabojait.gabojaitspring.api.dto.common.response.PageData;
import com.gabojait.gabojaitspring.common.dto.response.PageData;
import com.gabojait.gabojaitspring.domain.profile.Education;
import com.gabojait.gabojaitspring.domain.profile.Portfolio;
import com.gabojait.gabojaitspring.domain.profile.Work;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.gabojait.gabojaitspring.api.dto.common.response;
package com.gabojait.gabojaitspring.common.dto.response;

import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.gabojait.gabojaitspring.api.dto.common.response;
package com.gabojait.gabojaitspring.common.dto.response;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.gabojait.gabojaitspring.api.dto.common.response;
package com.gabojait.gabojaitspring.common.dto.response;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.gabojait.gabojaitspring.api.dto.common.response;
package com.gabojait.gabojaitspring.common.dto.response;


import com.gabojait.gabojaitspring.common.code.ErrorCode;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.gabojait.gabojaitspring.api.dto.common.response;
package com.gabojait.gabojaitspring.common.dto.response;

import io.swagger.annotations.ApiModel;
import lombok.Builder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package com.gabojait.gabojaitspring.config;

import com.gabojait.gabojaitspring.auth.CustomAuthenticationEntryPoint;
import com.gabojait.gabojaitspring.auth.CustomAuthenticationFilter;
import com.gabojait.gabojaitspring.config.auth.CustomAuthenticationEntryPoint;
import com.gabojait.gabojaitspring.config.auth.CustomAuthenticationFilter;
import com.gabojait.gabojaitspring.domain.user.Role;
import com.gabojait.gabojaitspring.domain.user.UserRole;
import lombok.RequiredArgsConstructor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
import com.gabojait.gabojaitspring.api.dto.user.response.UserFindMyselfResponse;
import com.gabojait.gabojaitspring.api.dto.user.response.UserLoginResponse;
import com.gabojait.gabojaitspring.api.dto.user.response.UserRegisterResponse;
import com.gabojait.gabojaitspring.common.dto.response.*;
import com.gabojait.gabojaitspring.response.*;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.bind.annotation.RestController;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.gabojait.gabojaitspring.auth;
package com.gabojait.gabojaitspring.config.auth;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.gabojait.gabojaitspring.api.dto.common.response.ExceptionResponse;
import com.gabojait.gabojaitspring.common.dto.response.ExceptionResponse;
import com.gabojait.gabojaitspring.exception.CustomException;
import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpStatus;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.gabojait.gabojaitspring.auth;
package com.gabojait.gabojaitspring.config.auth;

import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.gabojait.gabojaitspring.auth;
package com.gabojait.gabojaitspring.config.auth;

import lombok.Getter;
import lombok.RequiredArgsConstructor;
Expand Down
Loading

0 comments on commit 54acd39

Please sign in to comment.