Skip to content

Commit

Permalink
[REFACTOR] 멀티 모듈 생성 #82
Browse files Browse the repository at this point in the history
  • Loading branch information
ddongseop committed Aug 8, 2023
1 parent ebb3389 commit 4190c57
Show file tree
Hide file tree
Showing 97 changed files with 552 additions and 371 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
aws-region: ap-northeast-2

# 3) 환경변수 파일 생성
- name: make application.properties 파일 생성
- name: make application.yaml 파일 생성
run: |
# application.yml 파일 생성
cd ./src/main/resources
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
distribution: 'temurin'

# 3) 환경변수 파일 생성
- name: make application.properties 파일 생성
- name: make application.yaml 파일 생성
run: |
## create application.yml
cd ./src/main/resources
Expand Down
97 changes: 37 additions & 60 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,74 +1,51 @@
plugins {
id 'java'
id 'org.springframework.boot' version '2.7.13'
id 'io.spring.dependency-management' version '1.0.15.RELEASE'
}

group = 'sopt.org'
version = '0.0.1-SNAPSHOT'

java {
sourceCompatibility = '11'
}
buildscript {
ext {
springBootVersion = "2.7.14"
}

configurations {
compileOnly {
extendsFrom annotationProcessor
repositories {
mavenCentral()
}
}

repositories {
mavenCentral()
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}

dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-validation'
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'

// Health Check
implementation 'org.springframework.boot:spring-boot-starter-actuator'

// JPA & Database
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'mysql:mysql-connector-java:8.0.32'
subprojects {
group = "sopt.org.umbba"
version = '0.0.1-SNAPSHOT'

//JSON
implementation 'com.googlecode.json-simple:json-simple:1.1.1'
apply plugin: "java-library"
apply plugin: "org.springframework.boot"
apply plugin: "io.spring.dependency-management"

// Slack Webhook
implementation 'com.slack.api:slack-api-client:1.28.0'
implementation 'com.google.code.gson:gson:2.10.1'
implementation 'com.squareup.okhttp3:okhttp:4.10.0'
implementation 'com.slack.api:slack-app-backend:1.28.0'
implementation 'com.slack.api:slack-api-model:1.28.0'
sourceCompatibility = "11"

// JWT
implementation group: 'io.jsonwebtoken', name: 'jjwt-api', version: '0.11.2'
implementation group: 'io.jsonwebtoken', name: 'jjwt-impl', version: '0.11.2'
implementation group: 'io.jsonwebtoken', name: 'jjwt-jackson', version: '0.11.2'

// Spring Security
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.security:spring-security-test'

// Redis
implementation 'org.springframework.boot:spring-boot-starter-data-redis'
repositories {
mavenCentral()
}

// Social Login
implementation 'org.springframework.cloud:spring-cloud-starter-openfeign:3.1.7'
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}

// random String
implementation 'org.apache.commons:commons-lang3'
dependencies {
implementation "org.springframework.boot:spring-boot-starter-validation"
testImplementation "org.springframework.boot:spring-boot-starter-test"

// Firebase
implementation 'com.google.firebase:firebase-admin:9.1.1'
// lombok
compileOnly "org.projectlombok:lombok"
annotationProcessor "org.projectlombok:lombok"

// Health Check
implementation 'org.springframework.boot:spring-boot-starter-actuator'

}
}

tasks.named('test') {
useJUnitPlatform()
}
test {
useJUnitPlatform()
}
}
7 changes: 7 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
rootProject.name = 'umbbaServer'

include 'umbba-common'
include 'umbba-domain'
include 'umbba-external'
include 'umbba-api'
include 'umbba-notification'

15 changes: 15 additions & 0 deletions src/main/java/sopt/org/umbba/UmbbaServerApplication.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package sopt.org.umbba;

//@EnableJpaAuditing
//@EnableScheduling
//@SpringBootApplication(exclude = { UserDetailsServiceAutoConfiguration.class })
//@EnableFeignClients
//public class UmbbaServerApplication {
//
// public static void main(String[] args) {
//
// SpringApplication.run(UmbbaServerApplication.class, args);
//
// }
//
//}
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
package sopt.org.umbbaServer.domain.parentchild.controller;
package sopt.org.umbba.domain.parentchild.controller;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.*;
import sopt.org.umbbaServer.domain.parentchild.controller.dto.request.InviteCodeRequestDto;
import sopt.org.umbbaServer.domain.parentchild.controller.dto.request.OnboardingInviteRequestDto;
import sopt.org.umbbaServer.domain.parentchild.controller.dto.request.OnboardingReceiveRequestDto;
import sopt.org.umbbaServer.domain.parentchild.controller.dto.response.InviteResultResponseDto;
import sopt.org.umbbaServer.domain.parentchild.controller.dto.response.OnboardingInviteResponseDto;
import sopt.org.umbbaServer.domain.parentchild.controller.dto.response.OnboardingReceiveResponseDto;
import sopt.org.umbbaServer.domain.parentchild.service.ParentchildService;
import sopt.org.umbbaServer.domain.qna.service.QnAService;
import sopt.org.umbbaServer.global.common.dto.ApiResponse;
import sopt.org.umbbaServer.global.config.jwt.JwtProvider;
import sopt.org.umbbaServer.global.exception.SuccessType;
import sopt.org.umbba.domain.parentchild.controller.dto.request.InviteCodeRequestDto;
import sopt.org.umbba.domain.parentchild.controller.dto.request.OnboardingInviteRequestDto;
import sopt.org.umbba.domain.parentchild.controller.dto.request.OnboardingReceiveRequestDto;
import sopt.org.umbba.domain.parentchild.controller.dto.response.InviteResultResponseDto;
import sopt.org.umbba.domain.parentchild.controller.dto.response.OnboardingInviteResponseDto;
import sopt.org.umbba.domain.parentchild.controller.dto.response.OnboardingReceiveResponseDto;
import sopt.org.umbba.domain.parentchild.service.ParentchildService;
import sopt.org.umbba.domain.qna.service.QnAService;
import sopt.org.umbba.global.common.dto.ApiResponse;
import sopt.org.umbba.global.config.jwt.JwtProvider;
import sopt.org.umbba.global.exception.SuccessType;

import javax.validation.Valid;
import java.security.Principal;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package sopt.org.umbbaServer.domain.parentchild.controller.dto.request;
package sopt.org.umbba.domain.parentchild.controller.dto.request;

import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package sopt.org.umbbaServer.domain.parentchild.controller.dto.request;
package sopt.org.umbba.domain.parentchild.controller.dto.request;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
Expand All @@ -8,7 +8,7 @@
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import sopt.org.umbbaServer.domain.user.controller.dto.request.UserInfoDto;
import sopt.org.umbba.domain.user.controller.dto.request.UserInfoDto;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package sopt.org.umbbaServer.domain.parentchild.controller.dto.request;
package sopt.org.umbba.domain.parentchild.controller.dto.request;

import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.NoArgsConstructor;
import sopt.org.umbbaServer.domain.user.controller.dto.request.UserInfoDto;
import sopt.org.umbba.domain.user.controller.dto.request.UserInfoDto;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
package sopt.org.umbbaServer.domain.parentchild.controller.dto.response;
package sopt.org.umbba.domain.parentchild.controller.dto.response;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import lombok.Builder;
import lombok.Getter;
import sopt.org.umbbaServer.domain.parentchild.model.Parentchild;
import sopt.org.umbbaServer.domain.user.controller.dto.request.UserInfoDto;
import sopt.org.umbbaServer.domain.user.model.User;
import sopt.org.umbba.domain.parentchild.model.Parentchild;
import sopt.org.umbba.domain.user.controller.dto.request.UserInfoDto;
import sopt.org.umbba.domain.user.model.User;

import java.util.List;
import java.util.stream.Collectors;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package sopt.org.umbbaServer.domain.parentchild.controller.dto.response;
package sopt.org.umbba.domain.parentchild.controller.dto.response;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import lombok.Builder;
import lombok.Getter;
import sopt.org.umbbaServer.domain.parentchild.model.Parentchild;
import sopt.org.umbbaServer.domain.user.controller.dto.request.UserInfoDto;
import sopt.org.umbbaServer.domain.user.model.User;
import sopt.org.umbba.domain.parentchild.model.Parentchild;
import sopt.org.umbba.domain.user.controller.dto.request.UserInfoDto;
import sopt.org.umbba.domain.user.model.User;

import java.time.LocalTime;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package sopt.org.umbbaServer.domain.parentchild.controller.dto.response;
package sopt.org.umbba.domain.parentchild.controller.dto.response;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import lombok.Builder;
import lombok.Getter;
import sopt.org.umbbaServer.domain.parentchild.model.Parentchild;
import sopt.org.umbbaServer.domain.user.controller.dto.request.UserInfoDto;
import sopt.org.umbbaServer.domain.user.model.User;
import sopt.org.umbba.domain.parentchild.model.Parentchild;
import sopt.org.umbba.domain.user.controller.dto.request.UserInfoDto;
import sopt.org.umbba.domain.user.model.User;

import java.time.LocalTime;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package sopt.org.umbbaServer.domain.parentchild.dao;
package sopt.org.umbba.domain.parentchild.dao;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Repository;
import sopt.org.umbbaServer.domain.parentchild.model.Parentchild;
import sopt.org.umbbaServer.domain.user.model.User;
import sopt.org.umbba.domain.parentchild.model.Parentchild;
import sopt.org.umbba.domain.user.model.User;

import javax.persistence.EntityManager;
import javax.persistence.NoResultException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
package sopt.org.umbbaServer.domain.parentchild.model;
package sopt.org.umbba.domain.parentchild.model;

import lombok.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.transaction.annotation.Transactional;
import sopt.org.umbbaServer.domain.qna.model.OnboardingAnswer;
import sopt.org.umbbaServer.domain.qna.model.QnA;
import sopt.org.umbbaServer.global.util.AuditingTimeEntity;
import sopt.org.umbba.domain.qna.model.OnboardingAnswer;
import sopt.org.umbba.domain.qna.model.QnA;
import sopt.org.umbba.global.util.AuditingTimeEntity;

import javax.persistence.*;
import java.time.LocalTime;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package sopt.org.umbbaServer.domain.parentchild.model;
package sopt.org.umbba.domain.parentchild.model;

import lombok.AccessLevel;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import sopt.org.umbbaServer.domain.user.model.User;
import sopt.org.umbbaServer.global.exception.CustomException;
import sopt.org.umbbaServer.global.exception.ErrorType;
import sopt.org.umbba.domain.user.model.User;
import sopt.org.umbba.global.exception.CustomException;
import sopt.org.umbba.global.exception.ErrorType;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package sopt.org.umbbaServer.domain.parentchild.repository;
package sopt.org.umbba.domain.parentchild.repository;

import org.springframework.data.repository.Repository;
import sopt.org.umbbaServer.domain.parentchild.model.Parentchild;
import sopt.org.umbba.domain.parentchild.model.Parentchild;

import java.util.List;
import java.util.Optional;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
package sopt.org.umbbaServer.domain.parentchild.service;
package sopt.org.umbba.domain.parentchild.service;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.RandomStringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import sopt.org.umbbaServer.domain.parentchild.controller.dto.request.InviteCodeRequestDto;
import sopt.org.umbbaServer.domain.parentchild.controller.dto.request.OnboardingInviteRequestDto;
import sopt.org.umbbaServer.domain.parentchild.controller.dto.request.OnboardingReceiveRequestDto;
import sopt.org.umbbaServer.domain.parentchild.controller.dto.response.InviteResultResponseDto;
import sopt.org.umbbaServer.domain.parentchild.controller.dto.response.OnboardingInviteResponseDto;
import sopt.org.umbbaServer.domain.parentchild.controller.dto.response.OnboardingReceiveResponseDto;
import sopt.org.umbbaServer.domain.parentchild.dao.ParentchildDao;
import sopt.org.umbbaServer.domain.parentchild.model.Parentchild;
import sopt.org.umbbaServer.domain.parentchild.model.ParentchildRelation;
import sopt.org.umbbaServer.domain.parentchild.repository.ParentchildRepository;
import sopt.org.umbbaServer.domain.qna.model.OnboardingAnswer;
import sopt.org.umbbaServer.domain.user.model.User;
import sopt.org.umbbaServer.domain.user.repository.UserRepository;
import sopt.org.umbbaServer.global.config.ScheduleConfig;
import sopt.org.umbbaServer.global.exception.CustomException;
import sopt.org.umbbaServer.global.exception.ErrorType;
import sopt.org.umbbaServer.global.util.fcm.FCMScheduler;
import sopt.org.umbbaServer.global.util.fcm.FCMService;
import sopt.org.umbba.domain.parentchild.controller.dto.request.InviteCodeRequestDto;
import sopt.org.umbba.domain.parentchild.controller.dto.request.OnboardingInviteRequestDto;
import sopt.org.umbba.domain.parentchild.controller.dto.request.OnboardingReceiveRequestDto;
import sopt.org.umbba.domain.parentchild.controller.dto.response.InviteResultResponseDto;
import sopt.org.umbba.domain.parentchild.controller.dto.response.OnboardingInviteResponseDto;
import sopt.org.umbba.domain.parentchild.controller.dto.response.OnboardingReceiveResponseDto;
import sopt.org.umbba.domain.parentchild.dao.ParentchildDao;
import sopt.org.umbba.domain.parentchild.model.Parentchild;
import sopt.org.umbba.domain.parentchild.model.ParentchildRelation;
import sopt.org.umbba.domain.parentchild.repository.ParentchildRepository;
import sopt.org.umbba.domain.qna.model.OnboardingAnswer;
import sopt.org.umbba.domain.user.model.User;
import sopt.org.umbba.domain.user.repository.UserRepository;
import sopt.org.umbba.global.config.ScheduleConfig;
import sopt.org.umbba.global.exception.CustomException;
import sopt.org.umbba.global.exception.ErrorType;
import sopt.org.umbba.global.util.fcm.FCMScheduler;
import sopt.org.umbba.global.util.fcm.FCMService;

import java.util.List;
import java.util.stream.Collectors;
Expand Down
Loading

0 comments on commit 4190c57

Please sign in to comment.