Skip to content

Commit

Permalink
Merge pull request #169 from theMomentTeam/feature/file-structure
Browse files Browse the repository at this point in the history
Feature/file structure
  • Loading branch information
siwony authored Jun 19, 2021
2 parents c555e73 + 88d0808 commit c02c79c
Show file tree
Hide file tree
Showing 67 changed files with 226 additions and 231 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.moment.the.domain;
package com.moment.the.admin;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package com.moment.the.controller.release;

import com.moment.the.domain.response.CommonResult;
import com.moment.the.domain.response.ResponseService;
import com.moment.the.domain.response.SingleResult;
import com.moment.the.dto.AdminDto;
import com.moment.the.dto.SignInDto;
import com.moment.the.service.AdminService;
package com.moment.the.admin.controller;


import com.moment.the.admin.dto.AdminDto;
import com.moment.the.admin.dto.SignInDto;
import com.moment.the.admin.service.AdminService;
import com.moment.the.response.ResponseService;
import com.moment.the.response.result.CommonResult;
import com.moment.the.response.result.SingleResult;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import lombok.RequiredArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.moment.the.dto;
package com.moment.the.admin.dto;

import com.moment.the.domain.AdminDomain;

import com.moment.the.admin.AdminDomain;
import lombok.*;

import javax.validation.constraints.Email;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.moment.the.dto;
package com.moment.the.admin.dto;

import com.moment.the.domain.AdminDomain;
import com.moment.the.admin.AdminDomain;
import lombok.*;

import javax.validation.constraints.NotBlank;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.moment.the.repository;
package com.moment.the.admin.repository;

import com.moment.the.domain.AdminDomain;
import com.moment.the.admin.AdminDomain;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.moment.the.service;
package com.moment.the.admin.service;

import com.moment.the.dto.AdminDto;
import com.moment.the.dto.SignInDto;
import com.moment.the.admin.dto.AdminDto;
import com.moment.the.admin.dto.SignInDto;

import java.util.Map;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package com.moment.the.service;
package com.moment.the.admin.service;

import com.moment.the.advice.exception.UserAlreadyExistsException;
import com.moment.the.advice.exception.UserNotFoundException;
import com.moment.the.config.security.JwtUtil;
import com.moment.the.domain.AdminDomain;
import com.moment.the.dto.AdminDto;
import com.moment.the.dto.SignInDto;
import com.moment.the.repository.AdminRepository;
import com.moment.the.admin.AdminDomain;
import com.moment.the.admin.dto.AdminDto;
import com.moment.the.admin.dto.SignInDto;
import com.moment.the.admin.repository.AdminRepository;
import com.moment.the.config.security.jwt.JwtUtil;
import com.moment.the.exceptionAdvice.exception.UserAlreadyExistsException;
import com.moment.the.exceptionAdvice.exception.UserNotFoundException;
import com.moment.the.util.RedisUtil;
import lombok.RequiredArgsConstructor;
import org.springframework.security.core.context.SecurityContextHolder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
package com.moment.the.domain;
package com.moment.the.answer;

import com.moment.the.dto.AnswerDto;


import com.moment.the.admin.AdminDomain;
import com.moment.the.answer.dto.AnswerDto;
import com.moment.the.table.TableDomain;
import com.sun.istack.NotNull;
import lombok.AllArgsConstructor;
import lombok.Builder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package com.moment.the.controller.release;

import com.moment.the.domain.response.CommonResult;
import com.moment.the.domain.response.ResponseService;
import com.moment.the.domain.response.SingleResult;
import com.moment.the.dto.AnswerDto;
import com.moment.the.dto.AnswerResDto;
import com.moment.the.service.AnswerService;
package com.moment.the.answer.controller;


import com.moment.the.answer.dto.AnswerDto;
import com.moment.the.answer.dto.AnswerResDto;
import com.moment.the.answer.service.AnswerService;
import com.moment.the.response.ResponseService;
import com.moment.the.response.result.CommonResult;
import com.moment.the.response.result.SingleResult;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import lombok.RequiredArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.moment.the.dto;
package com.moment.the.answer.dto;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.moment.the.domain.AdminDomain;
import com.moment.the.domain.AnswerDomain;
import com.moment.the.domain.TableDomain;

import com.moment.the.admin.AdminDomain;
import com.moment.the.answer.AnswerDomain;
import lombok.*;

@Builder
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.moment.the.dto;
package com.moment.the.answer.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package com.moment.the.repository;
package com.moment.the.answer.repository;

import com.moment.the.domain.AdminDomain;
import com.moment.the.domain.AnswerDomain;

import com.moment.the.admin.AdminDomain;
import com.moment.the.answer.AnswerDomain;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
package com.moment.the.service;

import com.moment.the.advice.exception.*;
import com.moment.the.domain.AdminDomain;
import com.moment.the.domain.AnswerDomain;
import com.moment.the.domain.TableDomain;
import com.moment.the.dto.AnswerDto;
import com.moment.the.dto.AnswerResDto;
import com.moment.the.repository.AdminRepository;
import com.moment.the.repository.AnswerRepository;
import com.moment.the.repository.TableRepository;
package com.moment.the.answer.service;

import com.moment.the.admin.AdminDomain;
import com.moment.the.admin.repository.AdminRepository;
import com.moment.the.admin.service.AdminServiceImpl;
import com.moment.the.answer.AnswerDomain;
import com.moment.the.answer.dto.AnswerDto;
import com.moment.the.answer.dto.AnswerResDto;
import com.moment.the.answer.repository.AnswerRepository;
import com.moment.the.exceptionAdvice.exception.*;
import com.moment.the.table.TableDomain;
import com.moment.the.table.repository.TableRepository;
import lombok.RequiredArgsConstructor;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.moment.the.config.security;
package com.moment.the.config.exception;

import net.rakugakibox.util.YamlResourceBundle;
import org.springframework.beans.factory.annotation.Value;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package com.moment.the.config.security;

import com.moment.the.advice.ExceptionAdvice;
import com.moment.the.advice.exception.AccessTokenExpiredException;
import com.moment.the.advice.exception.InvalidTokenException;
import com.moment.the.advice.exception.UserNotFoundException;
import com.moment.the.domain.response.CommonResult;
import com.moment.the.domain.response.ResponseService;
package com.moment.the.config.mvc;

import com.moment.the.exceptionAdvice.ExceptionAdvice;
import com.moment.the.exceptionAdvice.exception.AccessTokenExpiredException;
import com.moment.the.exceptionAdvice.exception.InvalidTokenException;
import com.moment.the.exceptionAdvice.exception.UserNotFoundException;
import com.moment.the.response.ResponseService;
import com.moment.the.response.result.CommonResult;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.HttpStatus;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.moment.the.config.security;

import com.moment.the.config.mvc.ExceptionHandlerFilter;
import com.moment.the.config.security.jwt.JwtRequestFilter;
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
@@ -1,7 +1,7 @@
package com.moment.the.config.security;
package com.moment.the.config.security.auth;

import com.moment.the.domain.AdminDomain;
import com.moment.the.repository.AdminRepository;
import com.moment.the.admin.AdminDomain;
import com.moment.the.admin.repository.AdminRepository;
import lombok.RequiredArgsConstructor;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package com.moment.the.config.security;
package com.moment.the.config.security.jwt;

import com.moment.the.advice.exception.AccessTokenExpiredException;
import com.moment.the.advice.exception.InvalidTokenException;
import com.moment.the.advice.exception.UserNotFoundException;
import com.moment.the.config.security.auth.MyUserDetailsService;
import com.moment.the.exceptionAdvice.exception.AccessTokenExpiredException;
import com.moment.the.exceptionAdvice.exception.InvalidTokenException;
import com.moment.the.exceptionAdvice.exception.UserNotFoundException;
import com.moment.the.util.RedisUtil;
import io.jsonwebtoken.ExpiredJwtException;
import io.jsonwebtoken.MalformedJwtException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.moment.the.config.security;
package com.moment.the.config.security.jwt;

import io.jsonwebtoken.Claims;
import io.jsonwebtoken.ExpiredJwtException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.moment.the.advice;
package com.moment.the.exceptionAdvice;

import com.moment.the.advice.exception.*;
import com.moment.the.domain.response.CommonResult;
import com.moment.the.domain.response.ResponseService;
import com.moment.the.exceptionAdvice.exception.*;
import com.moment.the.response.result.CommonResult;
import com.moment.the.response.ResponseService;
import lombok.RequiredArgsConstructor;
import org.springframework.context.MessageSource;
import org.springframework.context.i18n.LocaleContextHolder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.moment.the.controller.exception;
package com.moment.the.exceptionAdvice.controller;

import com.moment.the.advice.exception.*;
import com.moment.the.domain.response.CommonResult;
import com.moment.the.exceptionAdvice.exception.*;
import com.moment.the.response.result.CommonResult;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.moment.the.advice.exception;
package com.moment.the.exceptionAdvice.exception;

public class AccessNotFoundException extends RuntimeException{
public AccessNotFoundException(String msg, Throwable t){
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.moment.the.advice.exception;
package com.moment.the.exceptionAdvice.exception;

public class AccessTokenExpiredException extends RuntimeException{
public AccessTokenExpiredException(String msg, Throwable t){
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.moment.the.advice.exception;
package com.moment.the.exceptionAdvice.exception;

public class AnswerAlreadyExistsException extends RuntimeException{
public AnswerAlreadyExistsException(String msg, Throwable t){
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.moment.the.advice.exception;
package com.moment.the.exceptionAdvice.exception;

public class CustomMethodArgumentNotValidException extends RuntimeException{
public CustomMethodArgumentNotValidException(String msg, Throwable t){
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.moment.the.advice.exception;
package com.moment.the.exceptionAdvice.exception;

public class GoodsNotCancelException extends RuntimeException{
public GoodsNotCancelException(String msg, Throwable t){
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.moment.the.advice.exception;
package com.moment.the.exceptionAdvice.exception;

public class InvalidTokenException extends RuntimeException{
public InvalidTokenException(String msg, Throwable t){
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.moment.the.advice.exception;
package com.moment.the.exceptionAdvice.exception;

public class NoCommentException extends RuntimeException{
public NoCommentException(String msg, Throwable t){
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.moment.the.advice.exception;
package com.moment.the.exceptionAdvice.exception;

public class NoGoodException extends RuntimeException{
public NoGoodException(String msg, Throwable t){
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.moment.the.advice.exception;
package com.moment.the.exceptionAdvice.exception;

public class NoImprovementException extends RuntimeException{
public NoImprovementException(String msg, Throwable t){
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.moment.the.advice.exception;
package com.moment.the.exceptionAdvice.exception;

public class NoPostException extends RuntimeException{
public NoPostException(String msg, Throwable t){
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.moment.the.advice.exception;
package com.moment.the.exceptionAdvice.exception;

public class UserAlreadyExistsException extends RuntimeException{
public UserAlreadyExistsException(String msg, Throwable t){
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.moment.the.advice.exception;
package com.moment.the.exceptionAdvice.exception;

public class UserNotFoundException extends RuntimeException{
public UserNotFoundException(String msg, Throwable t){
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.moment.the.advice.handler;
package com.moment.the.exceptionAdvice.handler;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.moment.the.advice.handler;
package com.moment.the.exceptionAdvice.handler;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.moment.the.advice.handler;
package com.moment.the.exceptionAdvice.handler;


import javax.servlet.ServletException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.moment.the.advice.handler;
package com.moment.the.exceptionAdvice.handler;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.moment.the.advice.handler;
package com.moment.the.exceptionAdvice.handler;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.moment.the.advice.handler;
package com.moment.the.exceptionAdvice.handler;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.moment.the.advice.handler;
package com.moment.the.exceptionAdvice.handler;

import lombok.extern.slf4j.Slf4j;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.moment.the.advice.handler;
package com.moment.the.exceptionAdvice.handler;

import lombok.extern.slf4j.Slf4j;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.moment.the.advice.handler;
package com.moment.the.exceptionAdvice.handler;

import lombok.extern.slf4j.Slf4j;

Expand Down
Loading

0 comments on commit c02c79c

Please sign in to comment.