Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spring bom #101

Merged
merged 4 commits into from
Dec 24, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
depend: 테스트 의존 중복 제거
inferior3x committed Dec 23, 2024
commit 90682baa421b709d47ea5dacb9c1b0578b5799fe
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -47,6 +47,8 @@ subprojects { // 모든 하위 모듈들에 이 설정을 적용합니다.
annotationProcessor 'org.projectlombok:lombok:1.18.30'

testImplementation 'com.tngtech.archunit:archunit-junit5:1.3.0'
testImplementation platform('org.junit:junit-bom:5.9.1')
testImplementation 'org.junit.jupiter:junit-jupiter'
}

test {
2 changes: 0 additions & 2 deletions modules/domain/build.gradle
Original file line number Diff line number Diff line change
@@ -12,8 +12,6 @@ repositories {
}

dependencies {
testImplementation platform('org.junit:junit-bom:5.9.1')
testImplementation 'org.junit.jupiter:junit-jupiter'
}

test {
3 changes: 0 additions & 3 deletions modules/infrastructure/api-query-jpa/build.gradle
Original file line number Diff line number Diff line change
@@ -13,9 +13,6 @@ dependencies {
compileOnly project(":modules:main-api")

compileOnly 'org.springframework.boot:spring-boot-starter-data-jpa:3.3.5'

testImplementation platform('org.junit:junit-bom:5.9.1')
testImplementation 'org.junit.jupiter:junit-jupiter'
}

test {
3 changes: 0 additions & 3 deletions modules/infrastructure/domain-jpa/build.gradle
Original file line number Diff line number Diff line change
@@ -14,9 +14,6 @@ dependencies {

implementation 'org.springframework.boot:spring-boot-starter-data-jpa:3.3.5'
runtimeOnly 'com.mysql:mysql-connector-j:8.3.0'

testImplementation platform('org.junit:junit-bom:5.9.1')
testImplementation 'org.junit.jupiter:junit-jupiter'
}

test {
3 changes: 0 additions & 3 deletions modules/infrastructure/log-writer/build.gradle
Original file line number Diff line number Diff line change
@@ -15,9 +15,6 @@ dependencies {

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'
}

test {
3 changes: 0 additions & 3 deletions modules/infrastructure/logging/build.gradle
Original file line number Diff line number Diff line change
@@ -13,9 +13,6 @@ dependencies {
implementation 'org.apache.httpcomponents:httpclient:4.5.14'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.17.2'
implementation 'ch.qos.logback:logback-classic:1.5.11'

testImplementation platform('org.junit:junit-bom:5.9.1')
testImplementation 'org.junit.jupiter:junit-jupiter'
}

test {
3 changes: 0 additions & 3 deletions modules/main-api/build.gradle
Original file line number Diff line number Diff line change
@@ -29,9 +29,6 @@ dependencies {

//main-api 구현 모듈 (runtimeOnly - 순환 의존 방지)
runtimeOnly project(":modules:infrastructure:api-query-jpa")

testImplementation platform('org.junit:junit-bom:5.9.1')
testImplementation 'org.junit.jupiter:junit-jupiter'
}


Original file line number Diff line number Diff line change
@@ -7,13 +7,15 @@
import com.whoz_in.domain.device.model.Device;
import com.whoz_in.domain.shared.event.EventBus;
import lombok.RequiredArgsConstructor;
import org.springframework.transaction.annotation.Transactional;

@Handler
@RequiredArgsConstructor
public class DeviceAddHandler extends CommandHandler<DeviceAdd> {
private final RequesterInfo requesterInfo;
private final DeviceRepository repository;
private final EventBus eventBus;
@Transactional
@Override
public void handle(DeviceAdd command) {
Device device = Device.create(
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.whoz_in.main_api.command.member.presentation;

import com.whoz_in.main_api.command.device.application.DeviceAdd;
import com.whoz_in.main_api.shared.presentation.CommandQueryController;
import com.whoz_in.main_api.shared.application.command.CommandBus;
import com.whoz_in.main_api.shared.application.query.QueryBus;
@@ -19,14 +20,14 @@ public String getClientIp(HttpServletRequest request) {
String httpXForwardedFor2 = request.getHeader("HTTP_X_Forwarded_For");
String xRealIp = request.getHeader("X-Real-IP");
String remoteAddr = request.getRemoteAddr();

StringBuilder result = new StringBuilder();
result.append("X-Forwarded-For: ").append(xForwardedFor).append("\n");
result.append("HTTP-X-Forwarded-For: ").append(httpXForwardedFor).append("\n");
result.append("HTTP-X-Forwarded-For2: ").append(httpXForwardedFor2).append("\n");
result.append("X-Real-IP: ").append(xRealIp).append("\n");
result.append("RemoteAddr: ").append(remoteAddr).append("\n");

dispatch(new DeviceAdd("11:11:11:11:11:11", "111.111.111.111"));
return result.toString();
}
}
3 changes: 0 additions & 3 deletions modules/master-api/build.gradle
Original file line number Diff line number Diff line change
@@ -19,9 +19,6 @@ dependencies {

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

testImplementation platform('org.junit:junit-bom:5.9.1')
testImplementation 'org.junit.jupiter:junit-jupiter'
}

test {