Skip to content

Commit

Permalink
Merge pull request #86 from JNU-econovation/log_writer_mariadb
Browse files Browse the repository at this point in the history
[DEPEND] Log writer mariadb
  • Loading branch information
inferior3x authored Dec 6, 2024
2 parents c258a50 + ae2abe2 commit 3bf8c87
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions modules/infrastructure/log-writer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

@FunctionalInterface
public interface BiValidator<T, U>{
ValidationResult getValidationResult(T t, U u);
ValidationResult getValidationResult(T target1, U target2);

default void validate(T target1, U target2){
ValidationResult validationResult = getValidationResult(target1, target2);
Expand Down
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
import java.util.Collection;
import java.util.List;

public class ValidationResult {
//Validator가 검증 실패한 내용을 담는 객체
public final class ValidationResult {
private final List<String> errors;

public ValidationResult() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//검증 원인을 여러 개 담고 싶었는데, Spring Validator는 단일 객체를 대상으로 하는 필드 중심 검증이기 때문에 만듦
@FunctionalInterface
public interface Validator<T> {
ValidationResult getValidationResult(T t);
ValidationResult getValidationResult(T target);

default void validate(T target){
ValidationResult validationResult = getValidationResult(target);
Expand Down

0 comments on commit 3bf8c87

Please sign in to comment.