Skip to content

Commit

Permalink
Merge pull request #16 from minseok1015/update_gradle
Browse files Browse the repository at this point in the history
Update gradle
  • Loading branch information
minseok1015 authored Jul 12, 2024
2 parents 0c0daec + b28ce8b commit 85cd844
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 49 deletions.
5 changes: 5 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ dependencies {
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'

implementation 'org.springframework.boot:spring-boot-starter-validation'

implementation 'org.springframework.session:spring-session-jdbc'
compileOnly 'org.projectlombok:lombok'
runtimeOnly 'com.mysql:mysql-connector-j'
Expand All @@ -42,6 +45,8 @@ dependencies {
implementation 'io.jsonwebtoken:jjwt-api:0.11.2'
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.11.2', 'io.jsonwebtoken:jjwt-jackson:0.11.2'

// aop
implementation 'org.springframework.boot:spring-boot-starter-aop'
}

tasks.named('test') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,26 @@ public enum BaseExceptionResponseStatus implements ResponseStatus {
INVALID_USER_VALUE(5000, HttpStatus.BAD_REQUEST.value(), "회원가입 요청에서 잘못된 값이 존재합니다."),
DUPLICATE_EMAIL(5001, HttpStatus.BAD_REQUEST.value(), "이미 존재하는 이메일입니다."),
DUPLICATE_NICKNAME(5002, HttpStatus.BAD_REQUEST.value(), "이미 존재하는 닉네임입니다."),
USER_NOT_FOUND(4003, HttpStatus.BAD_REQUEST.value(), "존재하지 않는 회원입니다."),
PASSWORD_NO_MATCH(4004, HttpStatus.BAD_REQUEST.value(), "비밀번호가 일치하지 않습니다."),
INVALID_USER_STATUS(4005, HttpStatus.BAD_REQUEST.value(), "잘못된 회원 status 값입니다."),
EMAIL_NOT_FOUND(4006, HttpStatus.BAD_REQUEST.value(), "존재하지 않는 이메일입니다."),
INVALID_PASSWORD(4007, HttpStatus.BAD_REQUEST.value(), "유효하지 않는 password입니다."),

INVALID_STORE_VALUE(6000, HttpStatus.BAD_REQUEST.value(), "가게 등록 요청에서 잘못된 값이 존재합니다."),
DUPLICATE_STORENAME(6001, HttpStatus.BAD_REQUEST.value(), "중복된 가게 이름이 존재합니다.");
USER_NOT_FOUND(5003, HttpStatus.BAD_REQUEST.value(), "존재하지 않는 회원입니다."),
PASSWORD_NO_MATCH(5004, HttpStatus.BAD_REQUEST.value(), "비밀번호가 일치하지 않습니다."),
INVALID_USER_STATUS(5005, HttpStatus.BAD_REQUEST.value(), "잘못된 회원 status 값입니다."),
EMAIL_NOT_FOUND(5006, HttpStatus.BAD_REQUEST.value(), "존재하지 않는 이메일입니다."),
INVALID_PASSWORD(5007, HttpStatus.BAD_REQUEST.value(), "유효하지 않는 password입니다.");


/**
* 6000: Debate 오류
*/




/**
* 7000: Vote 오류
*/




private final int code;
private final int status;
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/store/itpick/backend/dto/auth/LoginRequest.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package store.itpick.backend.dto.auth;

// import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotBlank;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
Expand All @@ -10,10 +10,10 @@
@NoArgsConstructor
public class LoginRequest {

// @NotBlank(message = "email: {NotBlank}")
// private String email;
//
// @NotBlank(message = "password: {NotBlank}")
// private String password;
@NotBlank(message = "email: {NotBlank}")
private String email;

@NotBlank(message = "password: {NotBlank}")
private String password;

}
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
//package store.itpick.backend.support.logging;
//
//import lombok.extern.slf4j.Slf4j;
//import org.aspectj.lang.JoinPoint;
//import org.aspectj.lang.annotation.Aspect;
//import org.aspectj.lang.annotation.Before;
//import org.aspectj.lang.annotation.Pointcut;
//import org.springframework.stereotype.Component;
//
//@Slf4j
//@Component
//@Aspect
//public class LoggingAspect {
//
// @Pointcut("execution(public * kuit3.backend..*(..))) " +
// "&& !execution(public * kuit3.backend.support.logging..*(..))")
// private void allComponents() {}
//
// @Pointcut("execution(public * kuit3.backend.controller..*(..))")
// private void allController() {}
//
// @Pointcut("execution(public * kuit3.backend.service..*(..))")
// private void allService() {}
//
// @Pointcut("execution(public * kuit3.backend.common.argument_resolver..*(..))")
// private void allArgumentResolver() {}
//
// @Pointcut("execution(public * kuit3.backend.common.interceptor..*(..))")
// private void allInterceptor() {}
//
// @Before("allComponents()")
// public void doLog(JoinPoint joinPoint) {
// log.info("[{}]", joinPoint.getSignature().toShortString());
// }
//}
package store.itpick.backend.support.logging;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

@Slf4j
@Component
@Aspect
public class LoggingAspect {

@Pointcut("execution(public * store.itpick.backend..*(..))) " +
"&& !execution(public * kuit3.backend.support.logging..*(..))")
private void allComponents() {}

@Pointcut("execution(public * store.itpick.backend.controller..*(..))")
private void allController() {}

@Pointcut("execution(public * store.itpick.backend.service..*(..))")
private void allService() {}

@Pointcut("execution(public * store.itpick.backend.common.argument_resolver..*(..))")
private void allArgumentResolver() {}

@Pointcut("execution(public * store.itpick.backend.common.interceptor..*(..))")
private void allInterceptor() {}

@Before("allComponents()")
public void doLog(JoinPoint joinPoint) {
log.info("[{}]", joinPoint.getSignature().toShortString());
}
}

0 comments on commit 85cd844

Please sign in to comment.