From e38fedae6660f2eb3c81da284f95ec8ee4948222 Mon Sep 17 00:00:00 2001 From: OziinG Date: Thu, 24 Oct 2024 13:53:30 +0900 Subject: [PATCH] =?UTF-8?q?test:=20Spotless=20=EC=A0=81=EC=9A=A9=20?= =?UTF-8?q?=ED=85=8C=EC=8A=A4=ED=8A=B8=20(#16)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .DS_Store | Bin 6148 -> 0 bytes HELP.md | 32 --- gradlew | 0 gradlew.bat | 188 +++++++++--------- .../MeongHaNyangServerApplication.java | 24 +-- .../meonghanyangserver/common/api/Api.java | 160 +++++++-------- .../meonghanyangserver/common/api/Result.java | 124 ++++++------ .../common/error/ErrorTypeCode.java | 42 ++-- .../common/error/SuccessTypeCode.java | 34 ++-- .../common/error/TypeCodeIfs.java | 18 +- .../common/exception/ApiException.java | 46 ++--- .../common/exception/ApiExceptionItf.java | 18 +- .../user/repository/JpaUserRepository.java | 18 +- .../user/repository/UserRepository.java | 6 +- .../user/repository/UserRepositoryImpl.java | 20 +- 15 files changed, 349 insertions(+), 381 deletions(-) delete mode 100644 .DS_Store delete mode 100644 HELP.md mode change 100755 => 100644 gradlew diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 12ab27936c3bbf5021bc0162becbc8e239bee8b9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHKOG*Pl5PdZXCLw}Zx)J6C0dFt~2`DItUO*=kLSQtI4{m4g9lV04@i4CRRd*9J zGtr$QQWdISPxq_-ydI`g0A#qyPJtePHeE65u-IeTuU@k#v}mWeF*5Wq!xDGMYHVxx ziwfx39U{dBbL2d=&-2SMJmM7>s`S~$ZP7q}w-9$A@<0ol(xtMA~N>;Xo&B<_oNsf>Sw6{cA8H^&24 zxcW{lX!P!U4f2ukcxS7%yB@7H1xx``V5@+BA7Z*<60q>- zJ{>Gv3P5bK*%|AaOK40SFbPR-oY@dwTzmzs~>5LH1+{m;(Pw0cnnIMni5X+^x0E>0KMsZ|Q2v nD?DyPSaDY|xq1~J)19$B)(SBRSa@U$&He~D8LTh`epP`F&ENUL 2>&1 -if %ERRORLEVEL% equ 0 goto execute - -echo. 1>&2 -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 -echo. 1>&2 -echo Please set the JAVA_HOME variable in your environment to match the 1>&2 -echo location of your Java installation. 1>&2 - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. 1>&2 -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 -echo. 1>&2 -echo Please set the JAVA_HOME variable in your environment to match the 1>&2 -echo location of your Java installation. 1>&2 - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if %ERRORLEVEL% equ 0 goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 0 goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/src/main/java/org/ioteatime/meonghanyangserver/MeongHaNyangServerApplication.java b/src/main/java/org/ioteatime/meonghanyangserver/MeongHaNyangServerApplication.java index 1e4fadec..a4dea894 100644 --- a/src/main/java/org/ioteatime/meonghanyangserver/MeongHaNyangServerApplication.java +++ b/src/main/java/org/ioteatime/meonghanyangserver/MeongHaNyangServerApplication.java @@ -1,12 +1,12 @@ -package org.ioteatime.meonghanyangserver; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class MeongHaNyangServerApplication { - - public static void main(String[] args) { - SpringApplication.run(MeongHaNyangServerApplication.class, args); - } -} +package org.ioteatime.meonghanyangserver; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class MeongHaNyangServerApplication { + + public static void main(String[] args) { + SpringApplication.run(MeongHaNyangServerApplication.class, args); + } +} diff --git a/src/main/java/org/ioteatime/meonghanyangserver/common/api/Api.java b/src/main/java/org/ioteatime/meonghanyangserver/common/api/Api.java index 6c683ba2..659822ba 100644 --- a/src/main/java/org/ioteatime/meonghanyangserver/common/api/Api.java +++ b/src/main/java/org/ioteatime/meonghanyangserver/common/api/Api.java @@ -1,80 +1,80 @@ -package org.ioteatime.meonghanyangserver.common.api; - -import jakarta.validation.Valid; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; -import org.ioteatime.meonghanyangserver.common.error.TypeCodeIfs; - -@Data -@AllArgsConstructor -@NoArgsConstructor -// 공통 응답 class -public class Api { - private Result result; - - @Valid private T body; - - // 정상 응답 body 있는 경우 - public static Api OK(T data) { - Api api = new Api(); - api.result = Result.OK(); - api.body = data; - return api; - } - - // 정상 응답 body 없는 경우 - public static Api OK() { - Api api = new Api<>(); - api.result = Result.OK(); - return api; - } - - // 정상 응답 - public static Api OK(TypeCodeIfs typeCodeIfs, T data) { - Api api = new Api(); - api.result = Result.OK(typeCodeIfs); - api.body = data; - return api; - } - - // 정상 응답 - public static Api OK(TypeCodeIfs typeCodeIfs) { - Api api = new Api(); - api.result = Result.OK(typeCodeIfs); - return api; - } - - public static Api CREATE() { - Api api = new Api<>(); - api.result = Result.CREATE(); - return api; - } - - public static Api CREATE(T data) { - Api api = new Api(); - api.result = Result.CREATE(); - api.body = data; - return api; - } - - public static Api CREATE(TypeCodeIfs typeCodeIfs) { - Api api = new Api<>(); - api.result = Result.CREATE(typeCodeIfs); - return api; - } - - public static Api CREATE(TypeCodeIfs typeCodeIfs, T data) { - Api api = new Api(); - api.result = Result.CREATE(typeCodeIfs); - api.body = data; - return api; - } - - // 에러 응답 - public static Api ERROR(TypeCodeIfs typeCodeIfs) { - Api api = new Api(); - api.result = Result.ERROR(typeCodeIfs); - return api; - } -} +package org.ioteatime.meonghanyangserver.common.api; + +import jakarta.validation.Valid; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import org.ioteatime.meonghanyangserver.common.error.TypeCodeIfs; + +@Data +@AllArgsConstructor +@NoArgsConstructor +// 공통 응답 class +public class Api { + private Result result; + + @Valid private T body; + + // 정상 응답 body 있는 경우 + public static Api OK(T data) { + Api api = new Api(); + api.result = Result.OK(); + api.body = data; + return api; + } + + // 정상 응답 body 없는 경우 + public static Api OK() { + Api api = new Api<>(); + api.result = Result.OK(); + return api; + } + + // 정상 응답 + public static Api OK(TypeCodeIfs typeCodeIfs, T data) { + Api api = new Api(); + api.result = Result.OK(typeCodeIfs); + api.body = data; + return api; + } + + // 정상 응답 + public static Api OK(TypeCodeIfs typeCodeIfs) { + Api api = new Api(); + api.result = Result.OK(typeCodeIfs); + return api; + } + + public static Api CREATE() { + Api api = new Api<>(); + api.result = Result.CREATE(); + return api; + } + + public static Api CREATE(T data) { + Api api = new Api(); + api.result = Result.CREATE(); + api.body = data; + return api; + } + + public static Api CREATE(TypeCodeIfs typeCodeIfs) { + Api api = new Api<>(); + api.result = Result.CREATE(typeCodeIfs); + return api; + } + + public static Api CREATE(TypeCodeIfs typeCodeIfs, T data) { + Api api = new Api(); + api.result = Result.CREATE(typeCodeIfs); + api.body = data; + return api; + } + + // 에러 응답 + public static Api ERROR(TypeCodeIfs typeCodeIfs) { + Api api = new Api(); + api.result = Result.ERROR(typeCodeIfs); + return api; + } +} diff --git a/src/main/java/org/ioteatime/meonghanyangserver/common/api/Result.java b/src/main/java/org/ioteatime/meonghanyangserver/common/api/Result.java index 26ebb27b..1d80609b 100644 --- a/src/main/java/org/ioteatime/meonghanyangserver/common/api/Result.java +++ b/src/main/java/org/ioteatime/meonghanyangserver/common/api/Result.java @@ -1,62 +1,62 @@ -package org.ioteatime.meonghanyangserver.common.api; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; -import org.ioteatime.meonghanyangserver.common.error.SuccessTypeCode; -import org.ioteatime.meonghanyangserver.common.error.TypeCodeIfs; - -@Builder -@Data -@NoArgsConstructor -@AllArgsConstructor -public class Result { - private Integer code; - private String message; - private String description; - - // 성공 - public static Result OK() { - return Result.builder() - .code(SuccessTypeCode.OK.getCode()) - .message(SuccessTypeCode.OK.getMessage()) - .description("SUCCESS") - .build(); - } - - // 성공 응답 커스텀 - public static Result OK(TypeCodeIfs typeCodeIfs) { - return Result.builder() - .code(typeCodeIfs.getCode()) - .message(typeCodeIfs.getMessage()) - .description(typeCodeIfs.getDescription()) - .build(); - } - - // 생성 응답 - public static Result CREATE() { - return Result.builder() - .code(SuccessTypeCode.CREATE.getCode()) - .message(SuccessTypeCode.CREATE.getMessage()) - .description("SUCCESS") - .build(); - } - - public static Result CREATE(TypeCodeIfs typeCodeIfs) { - return Result.builder() - .code(typeCodeIfs.getCode()) - .message(typeCodeIfs.getMessage()) - .description(typeCodeIfs.getDescription()) - .build(); - } - - // 에러 응답 - public static Result ERROR(TypeCodeIfs typeCodeIfs) { - return Result.builder() - .code(typeCodeIfs.getCode()) - .message(typeCodeIfs.getMessage()) - .description("ERROR") - .build(); - } -} +package org.ioteatime.meonghanyangserver.common.api; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import org.ioteatime.meonghanyangserver.common.error.SuccessTypeCode; +import org.ioteatime.meonghanyangserver.common.error.TypeCodeIfs; + +@Builder +@Data +@NoArgsConstructor +@AllArgsConstructor +public class Result { + private Integer code; + private String message; + private String description; + + // 성공 + public static Result OK() { + return Result.builder() + .code(SuccessTypeCode.OK.getCode()) + .message(SuccessTypeCode.OK.getMessage()) + .description("SUCCESS") + .build(); + } + + // 성공 응답 커스텀 + public static Result OK(TypeCodeIfs typeCodeIfs) { + return Result.builder() + .code(typeCodeIfs.getCode()) + .message(typeCodeIfs.getMessage()) + .description(typeCodeIfs.getDescription()) + .build(); + } + + // 생성 응답 + public static Result CREATE() { + return Result.builder() + .code(SuccessTypeCode.CREATE.getCode()) + .message(SuccessTypeCode.CREATE.getMessage()) + .description("SUCCESS") + .build(); + } + + public static Result CREATE(TypeCodeIfs typeCodeIfs) { + return Result.builder() + .code(typeCodeIfs.getCode()) + .message(typeCodeIfs.getMessage()) + .description(typeCodeIfs.getDescription()) + .build(); + } + + // 에러 응답 + public static Result ERROR(TypeCodeIfs typeCodeIfs) { + return Result.builder() + .code(typeCodeIfs.getCode()) + .message(typeCodeIfs.getMessage()) + .description("ERROR") + .build(); + } +} diff --git a/src/main/java/org/ioteatime/meonghanyangserver/common/error/ErrorTypeCode.java b/src/main/java/org/ioteatime/meonghanyangserver/common/error/ErrorTypeCode.java index 1e1aec6d..90175e9e 100644 --- a/src/main/java/org/ioteatime/meonghanyangserver/common/error/ErrorTypeCode.java +++ b/src/main/java/org/ioteatime/meonghanyangserver/common/error/ErrorTypeCode.java @@ -1,21 +1,21 @@ -package org.ioteatime.meonghanyangserver.common.error; - -import lombok.AllArgsConstructor; -import lombok.Getter; - -@AllArgsConstructor -@Getter -public enum ErrorTypeCode implements TypeCodeIfs { - // 잘못된 요청 - BAD_REQUEST(400, "bad request", "잘못된 요청"), - // 서버 오류 - SERVER_ERROR(500, "server error", "서버 오류"), - // null - NULL_POINT(512, "Null point", "null point 오류"), - // 인증 실패 - UNAUTHORIZED(401, "UNAUTHORIZED", "인증 실패"); - - private final Integer code; - private final String message; - private final String description; -} +package org.ioteatime.meonghanyangserver.common.error; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +@AllArgsConstructor +@Getter +public enum ErrorTypeCode implements TypeCodeIfs { + // 잘못된 요청 + BAD_REQUEST(400, "bad request", "잘못된 요청"), + // 서버 오류 + SERVER_ERROR(500, "server error", "서버 오류"), + // null + NULL_POINT(512, "Null point", "null point 오류"), + // 인증 실패 + UNAUTHORIZED(401, "UNAUTHORIZED", "인증 실패"); + + private final Integer code; + private final String message; + private final String description; +} diff --git a/src/main/java/org/ioteatime/meonghanyangserver/common/error/SuccessTypeCode.java b/src/main/java/org/ioteatime/meonghanyangserver/common/error/SuccessTypeCode.java index 43a320f2..ddbd152e 100644 --- a/src/main/java/org/ioteatime/meonghanyangserver/common/error/SuccessTypeCode.java +++ b/src/main/java/org/ioteatime/meonghanyangserver/common/error/SuccessTypeCode.java @@ -1,17 +1,17 @@ -package org.ioteatime.meonghanyangserver.common.error; - -import lombok.AllArgsConstructor; -import lombok.Getter; - -@AllArgsConstructor -@Getter -public enum SuccessTypeCode implements TypeCodeIfs { - // 성공 - OK(200, "OK", "success"), - // 생성 - CREATE(201, "CREATE", "success"); - - private final Integer code; - private final String message; - private final String description; -} +package org.ioteatime.meonghanyangserver.common.error; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +@AllArgsConstructor +@Getter +public enum SuccessTypeCode implements TypeCodeIfs { + // 성공 + OK(200, "OK", "success"), + // 생성 + CREATE(201, "CREATE", "success"); + + private final Integer code; + private final String message; + private final String description; +} diff --git a/src/main/java/org/ioteatime/meonghanyangserver/common/error/TypeCodeIfs.java b/src/main/java/org/ioteatime/meonghanyangserver/common/error/TypeCodeIfs.java index 0e645b5c..05dc5f92 100644 --- a/src/main/java/org/ioteatime/meonghanyangserver/common/error/TypeCodeIfs.java +++ b/src/main/java/org/ioteatime/meonghanyangserver/common/error/TypeCodeIfs.java @@ -1,9 +1,9 @@ -package org.ioteatime.meonghanyangserver.common.error; - -public interface TypeCodeIfs { - Integer getCode(); - - String getMessage(); - - String getDescription(); -} +package org.ioteatime.meonghanyangserver.common.error; + +public interface TypeCodeIfs { + Integer getCode(); + + String getMessage(); + + String getDescription(); +} diff --git a/src/main/java/org/ioteatime/meonghanyangserver/common/exception/ApiException.java b/src/main/java/org/ioteatime/meonghanyangserver/common/exception/ApiException.java index baa9916f..22b37c74 100644 --- a/src/main/java/org/ioteatime/meonghanyangserver/common/exception/ApiException.java +++ b/src/main/java/org/ioteatime/meonghanyangserver/common/exception/ApiException.java @@ -1,23 +1,23 @@ -package org.team5.interview_partner.common.exception; - -import lombok.Getter; -import org.ioteatime.meonghanyangserver.common.error.TypeCodeIfs; - -@Getter -public class ApiException extends RuntimeException - implements org.team5.interview_partner.common.exception.ApiExceptionItf { - private final TypeCodeIfs typeCodeIfs; - private final String errorDescription; - - public ApiException(TypeCodeIfs typeCodeIfs) { - super(typeCodeIfs.getDescription()); - this.typeCodeIfs = typeCodeIfs; - this.errorDescription = typeCodeIfs.getDescription(); - } - - public ApiException(TypeCodeIfs typeCodeIfs, String errorDescription) { - super(errorDescription); - this.typeCodeIfs = typeCodeIfs; - this.errorDescription = errorDescription; - } -} +package org.team5.interview_partner.common.exception; + +import lombok.Getter; +import org.ioteatime.meonghanyangserver.common.error.TypeCodeIfs; + +@Getter +public class ApiException extends RuntimeException + implements org.team5.interview_partner.common.exception.ApiExceptionItf { + private final TypeCodeIfs typeCodeIfs; + private final String errorDescription; + + public ApiException(TypeCodeIfs typeCodeIfs) { + super(typeCodeIfs.getDescription()); + this.typeCodeIfs = typeCodeIfs; + this.errorDescription = typeCodeIfs.getDescription(); + } + + public ApiException(TypeCodeIfs typeCodeIfs, String errorDescription) { + super(errorDescription); + this.typeCodeIfs = typeCodeIfs; + this.errorDescription = errorDescription; + } +} diff --git a/src/main/java/org/ioteatime/meonghanyangserver/common/exception/ApiExceptionItf.java b/src/main/java/org/ioteatime/meonghanyangserver/common/exception/ApiExceptionItf.java index 9c4e3e22..39817c8e 100644 --- a/src/main/java/org/ioteatime/meonghanyangserver/common/exception/ApiExceptionItf.java +++ b/src/main/java/org/ioteatime/meonghanyangserver/common/exception/ApiExceptionItf.java @@ -1,9 +1,9 @@ -package org.team5.interview_partner.common.exception; - -import org.ioteatime.meonghanyangserver.common.error.TypeCodeIfs; - -public interface ApiExceptionItf { - TypeCodeIfs getTypeCodeIfs(); - - String getErrorDescription(); -} +package org.team5.interview_partner.common.exception; + +import org.ioteatime.meonghanyangserver.common.error.TypeCodeIfs; + +public interface ApiExceptionItf { + TypeCodeIfs getTypeCodeIfs(); + + String getErrorDescription(); +} diff --git a/src/main/java/org/ioteatime/meonghanyangserver/user/repository/JpaUserRepository.java b/src/main/java/org/ioteatime/meonghanyangserver/user/repository/JpaUserRepository.java index 209ea677..2e4eabd1 100644 --- a/src/main/java/org/ioteatime/meonghanyangserver/user/repository/JpaUserRepository.java +++ b/src/main/java/org/ioteatime/meonghanyangserver/user/repository/JpaUserRepository.java @@ -1,9 +1,9 @@ -package org.ioteatime.meonghanyangserver.user.repository; - -import java.util.Optional; -import org.ioteatime.meonghanyangserver.user.domain.UserEntity; -import org.springframework.data.jpa.repository.JpaRepository; - -public interface JpaUserRepository extends JpaRepository { - Optional findByEmail(String email); -} +package org.ioteatime.meonghanyangserver.user.repository; + +import java.util.Optional; +import org.ioteatime.meonghanyangserver.user.domain.UserEntity; +import org.springframework.data.jpa.repository.JpaRepository; + +public interface JpaUserRepository extends JpaRepository { + Optional findByEmail(String email); +} diff --git a/src/main/java/org/ioteatime/meonghanyangserver/user/repository/UserRepository.java b/src/main/java/org/ioteatime/meonghanyangserver/user/repository/UserRepository.java index ade2f666..e59bf71f 100644 --- a/src/main/java/org/ioteatime/meonghanyangserver/user/repository/UserRepository.java +++ b/src/main/java/org/ioteatime/meonghanyangserver/user/repository/UserRepository.java @@ -1,3 +1,3 @@ -package org.ioteatime.meonghanyangserver.user.repository; - -public interface UserRepository {} +package org.ioteatime.meonghanyangserver.user.repository; + +public interface UserRepository {} diff --git a/src/main/java/org/ioteatime/meonghanyangserver/user/repository/UserRepositoryImpl.java b/src/main/java/org/ioteatime/meonghanyangserver/user/repository/UserRepositoryImpl.java index da9b1b59..46a3a476 100644 --- a/src/main/java/org/ioteatime/meonghanyangserver/user/repository/UserRepositoryImpl.java +++ b/src/main/java/org/ioteatime/meonghanyangserver/user/repository/UserRepositoryImpl.java @@ -1,10 +1,10 @@ -package org.ioteatime.meonghanyangserver.user.repository; - -import lombok.RequiredArgsConstructor; -import org.springframework.stereotype.Repository; - -@Repository -@RequiredArgsConstructor -public class UserRepositoryImpl implements UserRepository { - private final JpaUserRepository jpaUserRepository; -} +package org.ioteatime.meonghanyangserver.user.repository; + +import lombok.RequiredArgsConstructor; +import org.springframework.stereotype.Repository; + +@Repository +@RequiredArgsConstructor +public class UserRepositoryImpl implements UserRepository { + private final JpaUserRepository jpaUserRepository; +}