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

[refac] 모듈 의존성 정리 #171

Merged
merged 2 commits into from
Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 2 additions & 0 deletions Api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ repositories {

dependencies {
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-aop'

// swagger
implementation 'org.springdoc:springdoc-openapi-ui:1.6.12'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import allchive.server.api.config.security.SecurityUtil;
import allchive.server.core.annotation.UseCase;
import allchive.server.core.event.Event;
import allchive.server.core.event.events.s3.S3ImageDeleteEvent;
import allchive.server.infrastructure.s3.event.S3ImageDeleteEvent;
import allchive.server.domain.common.aop.distributedLock.DistributedLock;
import allchive.server.domain.common.enums.DistributedLockType;
import allchive.server.domain.domains.archiving.adaptor.ArchivingAdaptor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ public void errorExample(

@Operation(hidden = true)
@GetMapping(value = "health")
public ResponseEntity errorExample() {
return ResponseEntity.ok().build();
public void healthCheck() {
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package allchive.server.api.common.filter;


import com.amazonaws.util.IOUtils;
import org.apache.tomcat.util.http.fileupload.IOUtils;

import java.io.*;
import javax.servlet.ReadListener;
import javax.servlet.ServletInputStream;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import allchive.server.core.error.ErrorResponse;
import allchive.server.core.error.GlobalErrorCode;
import allchive.server.core.event.Event;
import allchive.server.core.event.events.slack.SlackErrorEvent;
import allchive.server.infrastructure.slack.event.SlackErrorEvent;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import allchive.server.api.content.model.mapper.ContentMapper;
import allchive.server.core.annotation.UseCase;
import allchive.server.core.event.Event;
import allchive.server.core.event.events.s3.S3ImageDeleteEvent;
import allchive.server.infrastructure.s3.event.S3ImageDeleteEvent;
import allchive.server.domain.common.aop.distributedLock.DistributedLock;
import allchive.server.domain.common.enums.DistributedLockType;
import allchive.server.domain.domains.archiving.service.ArchivingAsyncDomainService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import allchive.server.api.recycle.model.dto.request.ClearDeletedObjectRequest;
import allchive.server.core.annotation.UseCase;
import allchive.server.core.event.Event;
import allchive.server.core.event.events.s3.S3ImageDeleteEvent;
import allchive.server.infrastructure.s3.event.S3ImageDeleteEvent;
import allchive.server.domain.common.aop.distributedLock.DistributedLock;
import allchive.server.domain.common.enums.DistributedLockType;
import allchive.server.domain.domains.archiving.adaptor.ArchivingAdaptor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import allchive.server.core.annotation.UseCase;
import allchive.server.core.event.Event;
import allchive.server.core.event.events.s3.S3ImageDeleteEvent;
import allchive.server.infrastructure.s3.event.S3ImageDeleteEvent;
import allchive.server.domain.domains.archiving.adaptor.ArchivingAdaptor;
import allchive.server.domain.domains.archiving.domain.Archiving;
import allchive.server.domain.domains.archiving.service.ArchivingDomainService;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package allchive.server.api.search.service;

import static allchive.server.core.consts.AllchiveConst.ASTERISK;
import static allchive.server.core.consts.AllchiveConst.SEARCH_KEY;
import static jodd.util.StringPool.ASTERISK;

import allchive.server.api.common.util.StringParamUtil;
import allchive.server.api.search.model.dto.response.SearchListResponse;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import allchive.server.api.user.model.dto.request.UpdateUserInfoRequest;
import allchive.server.core.annotation.UseCase;
import allchive.server.core.event.Event;
import allchive.server.core.event.events.s3.S3ImageDeleteEvent;
import allchive.server.infrastructure.s3.event.S3ImageDeleteEvent;
import allchive.server.domain.common.aop.distributedLock.DistributedLock;
import allchive.server.domain.common.enums.DistributedLockType;
import allchive.server.domain.domains.user.adaptor.UserAdaptor;
Expand Down
1 change: 0 additions & 1 deletion Core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ dependencies {
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'io.jsonwebtoken:jjwt-api:0.11.5'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.14.2'
api 'org.springframework.boot:spring-boot-starter-web'
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.11.5'
runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.11.5'

Expand Down
1 change: 0 additions & 1 deletion Domain/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ dependencies {
implementation 'mysql:mysql-connector-java:8.0.33'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-validation'
runtimeOnly 'com.h2database:h2'

implementation project(':Core')
implementation project(':Infrastructure')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package allchive.server.core.async;
package allchive.server.domain.config.async;


import allchive.server.core.event.Event;
import allchive.server.core.event.events.slack.SlackAsyncErrorEvent;
import java.lang.reflect.Method;

import allchive.server.infrastructure.slack.event.SlackAsyncErrorEvent;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package allchive.server.core.config;
package allchive.server.domain.config.async;

import static allchive.server.core.consts.AllchiveConst.*;

import allchive.server.core.async.CustomAsyncExceptionHandler;
import java.util.concurrent.Executor;
import java.util.concurrent.ThreadPoolExecutor;
import lombok.RequiredArgsConstructor;
Expand Down
4 changes: 2 additions & 2 deletions Domain/src/main/resources/application-domain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ spring:
activate:
on-profile: local
datasource:
url: jdbc:mysql://localhost:3306/test?useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Seoul&allowPublicKeyRetrieval=true&tinyInt1isBit=false
url: jdbc:mysql://localhost:3307/test?useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Seoul&allowPublicKeyRetrieval=true&tinyInt1isBit=false
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: test
password: root
hikari:
maxLifetime: 580000
maximum-pool-size: 20
Expand Down
13 changes: 7 additions & 6 deletions Infrastructure/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ jar { enabled = true }

dependencies {
api 'org.springframework.boot:spring-boot-starter-data-redis'
api 'org.redisson:redisson:3.19.0'
api 'io.github.openfeign:feign-httpclient:12.1'
api 'org.springframework.cloud:spring-cloud-starter-openfeign:3.1.4'
api 'com.amazonaws:aws-java-sdk-s3control:1.12.372'
api 'com.nimbusds:nimbus-jose-jwt:3.10'
api("com.slack.api:slack-api-client:1.28.0")
implementation 'org.redisson:redisson:3.19.0'
implementation 'io.github.openfeign:feign-httpclient:12.1'
implementation 'org.springframework.cloud:spring-cloud-starter-openfeign:3.1.4'
implementation 'com.amazonaws:aws-java-sdk-s3control:1.12.372'
implementation 'com.nimbusds:nimbus-jose-jwt:3.10'
implementation "com.slack.api:slack-api-client:1.28.0"
implementation 'org.springframework.boot:spring-boot-starter-web'

testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.2'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package allchive.server.core.event.events.s3;
package allchive.server.infrastructure.s3.event;


import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


import allchive.server.core.error.exception.S3ObjectNotFoundException;
import allchive.server.core.event.events.s3.S3ImageDeleteEvent;
import allchive.server.infrastructure.s3.event.S3ImageDeleteEvent;
import com.amazonaws.services.s3.AmazonS3;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import static com.slack.api.model.block.Blocks.section;
import static com.slack.api.model.block.composition.BlockCompositions.plainText;

import allchive.server.core.event.events.slack.SlackAsyncErrorEvent;
import allchive.server.core.event.events.slack.SlackErrorEvent;
import allchive.server.infrastructure.slack.event.SlackAsyncErrorEvent;
import allchive.server.infrastructure.slack.event.SlackErrorEvent;
import com.slack.api.model.block.Blocks;
import com.slack.api.model.block.DividerBlock;
import com.slack.api.model.block.HeaderBlock;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package allchive.server.infrastructure.slack;


import allchive.server.core.event.events.slack.SlackAsyncErrorEvent;
import allchive.server.core.event.events.slack.SlackErrorEvent;
import allchive.server.infrastructure.slack.event.SlackAsyncErrorEvent;
import allchive.server.infrastructure.slack.event.SlackErrorEvent;
import com.slack.api.webhook.Payload;
import java.io.IOException;
import lombok.RequiredArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package allchive.server.core.event.events.slack;
package allchive.server.infrastructure.slack.event;


import lombok.Builder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package allchive.server.core.event.events.slack;
package allchive.server.infrastructure.slack.event;


import lombok.Builder;
Expand Down
4 changes: 0 additions & 4 deletions config/nginx/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ server {

autoindex_localtime on;

if ($http_x_forwarded_proto != 'https') {
return 301 https://$host$request_uri;
}

location /api {
proxy_pass http://server:8080;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
Expand Down
4 changes: 0 additions & 4 deletions config/nginx/default.prod.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ server {

autoindex_localtime on;

if ($http_x_forwarded_proto != 'https') {
return 301 https://$host$request_uri;
}

location /api {
proxy_pass http://server:8080;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
Expand Down
8 changes: 5 additions & 3 deletions docker-compose.local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ services:
volumes:
- ./mysqldata:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=test
- MYSQL_USER=user
- MYSQL_PASSWORD=user
- MYSQL_ROOT_PASSWORD=root
- MYSQL_HOST=localhost
- MYSQL_PORT=3306
- MYSQL_PORT=3307
ports:
- "3306:3306"
- "3307:3306"
Loading