diff --git a/modules/infrastructure/log-writer/build.gradle b/modules/infrastructure/log-writer/build.gradle index 026945d..eb83b5b 100644 --- a/modules/infrastructure/log-writer/build.gradle +++ b/modules/infrastructure/log-writer/build.gradle @@ -14,6 +14,7 @@ dependencies { implementation 'com.fasterxml.jackson.core:jackson-databind:2.17.2' runtimeOnly 'com.mysql:mysql-connector-j:8.3.0' + runtimeOnly 'org.mariadb.jdbc:mariadb-java-client:3.1.4' testImplementation platform('org.junit:junit-bom:5.10.0') testImplementation 'org.junit.jupiter:junit-jupiter' diff --git a/modules/infrastructure/log-writer/src/main/java/com/whoz_in/log_writer/common/validation/BiValidator.java b/modules/infrastructure/log-writer/src/main/java/com/whoz_in/log_writer/common/validation/BiValidator.java index a6e859d..eadec0e 100644 --- a/modules/infrastructure/log-writer/src/main/java/com/whoz_in/log_writer/common/validation/BiValidator.java +++ b/modules/infrastructure/log-writer/src/main/java/com/whoz_in/log_writer/common/validation/BiValidator.java @@ -2,7 +2,7 @@ @FunctionalInterface public interface BiValidator{ - ValidationResult getValidationResult(T t, U u); + ValidationResult getValidationResult(T target1, U target2); default void validate(T target1, U target2){ ValidationResult validationResult = getValidationResult(target1, target2); diff --git a/modules/infrastructure/log-writer/src/main/java/com/whoz_in/log_writer/common/validation/ValidationException.java b/modules/infrastructure/log-writer/src/main/java/com/whoz_in/log_writer/common/validation/ValidationException.java index 79ce5c7..8b408f8 100644 --- a/modules/infrastructure/log-writer/src/main/java/com/whoz_in/log_writer/common/validation/ValidationException.java +++ b/modules/infrastructure/log-writer/src/main/java/com/whoz_in/log_writer/common/validation/ValidationException.java @@ -1,7 +1,5 @@ package com.whoz_in.log_writer.common.validation; -import java.util.stream.Collectors; - public class ValidationException extends RuntimeException{ public ValidationException(String message) { diff --git a/modules/infrastructure/log-writer/src/main/java/com/whoz_in/log_writer/common/validation/ValidationResult.java b/modules/infrastructure/log-writer/src/main/java/com/whoz_in/log_writer/common/validation/ValidationResult.java index 32519a6..9ceeaeb 100644 --- a/modules/infrastructure/log-writer/src/main/java/com/whoz_in/log_writer/common/validation/ValidationResult.java +++ b/modules/infrastructure/log-writer/src/main/java/com/whoz_in/log_writer/common/validation/ValidationResult.java @@ -4,7 +4,8 @@ import java.util.Collection; import java.util.List; -public class ValidationResult { +//Validator가 검증 실패한 내용을 담는 객체 +public final class ValidationResult { private final List errors; public ValidationResult() { diff --git a/modules/infrastructure/log-writer/src/main/java/com/whoz_in/log_writer/common/validation/Validator.java b/modules/infrastructure/log-writer/src/main/java/com/whoz_in/log_writer/common/validation/Validator.java index 5c8f143..fab758e 100644 --- a/modules/infrastructure/log-writer/src/main/java/com/whoz_in/log_writer/common/validation/Validator.java +++ b/modules/infrastructure/log-writer/src/main/java/com/whoz_in/log_writer/common/validation/Validator.java @@ -4,7 +4,7 @@ //검증 원인을 여러 개 담고 싶었는데, Spring Validator는 단일 객체를 대상으로 하는 필드 중심 검증이기 때문에 만듦 @FunctionalInterface public interface Validator { - ValidationResult getValidationResult(T t); + ValidationResult getValidationResult(T target); default void validate(T target){ ValidationResult validationResult = getValidationResult(target);