Skip to content

Commit

Permalink
Merge pull request #225 from BudgetBuddiesTeam/dev
Browse files Browse the repository at this point in the history
[v13] 새로운 버전 배포
  • Loading branch information
m3k0813 authored Nov 29, 2024
2 parents aa295bd + 5bf8666 commit 741d30a
Show file tree
Hide file tree
Showing 165 changed files with 6,234 additions and 1,137 deletions.
89 changes: 52 additions & 37 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,60 +1,75 @@
plugins {
id 'java'
id 'org.springframework.boot' version '3.2.7'
id 'io.spring.dependency-management' version '1.1.5'
id 'com.google.cloud.tools.jib' version '3.4.3'
id 'java'
id 'org.springframework.boot' version '3.2.7'
id 'io.spring.dependency-management' version '1.1.5'
id 'com.google.cloud.tools.jib' version '3.4.3'
}

group = 'com.bbteam'
version = '0.0.1-SNAPSHOT'

java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}

configurations {
compileOnly {
extendsFrom annotationProcessor
}
compileOnly {
extendsFrom annotationProcessor
}
}

repositories {
mavenCentral()
mavenCentral()
}

dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-security' // security
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' //Swagger
compileOnly 'org.projectlombok:lombok'
runtimeOnly 'com.mysql:mysql-connector-j'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-security' // security
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' //Swagger

implementation 'net.nurigo:sdk:4.2.7' // 문자메시지 대행 서비스

implementation 'org.springframework.boot:spring-boot-starter-cache' // cache

compileOnly 'org.projectlombok:lombok'
runtimeOnly 'com.mysql:mysql-connector-j'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'

implementation 'io.jsonwebtoken:jjwt-api:0.11.5'
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.11.5'
runtimeOnly('io.jsonwebtoken:jjwt-jackson:0.11.5') // jackson으로 jwt 파싱

// querydsl 관련
implementation 'com.querydsl:querydsl-jpa:5.0.0:jakarta'
annotationProcessor "com.querydsl:querydsl-apt:${dependencyManagement.importedProperties['querydsl.version']}:jakarta"
annotationProcessor "jakarta.annotation:jakarta.annotation-api"
annotationProcessor "jakarta.persistence:jakarta.persistence-api"
}

tasks.named('test') {
useJUnitPlatform()
useJUnitPlatform()
}

jib {
from {
image = 'openjdk:17-alpine'
platforms {
platform {
architecture = 'amd64'
os = 'linux'
}
}
}
to {
image = 'binjumeoniz1/binjumeoniz:latest'
}
container {
jvmFlags = ['-Dspring.profiles.active=dev']
}
from {
image = 'openjdk:17-alpine'
platforms {
platform {
architecture = 'amd64'
os = 'linux'
}
}
}
to {
image = 'binjumeoniz1/binjumeoniz:latest'
}
container {
jvmFlags = ['-Dspring.profiles.active=dev']
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
import org.springframework.scheduling.annotation.EnableAsync;

@SpringBootApplication
@EnableJpaAuditing
@EnableAsync
@EnableCaching
public class BudgetbuddiesApplication {

public static void main(String[] args) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.bbteam.budgetbuddies.apiPayload;


import com.bbteam.budgetbuddies.apiPayload.code.BaseCode;
import com.bbteam.budgetbuddies.apiPayload.code.status.SuccessStatus;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
Expand All @@ -25,12 +24,6 @@ public static <T> ApiResponse<T> onSuccess(T result){

}

public static <T> ApiResponse<T> of(BaseCode code, T result){
return new ApiResponse<>(true, code.getReasonHttpStatus().getCode(),
code.getReasonHttpStatus().getMessage(), result);
}


public static <T> ApiResponse<T> onFailure(String code, String message, T data){
return new ApiResponse<>(false, code,message, data);
}
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,25 @@
public enum ErrorStatus implements BaseErrorCode {


_INTERNAL_SERVER_ERROR(HttpStatus.INTERNAL_SERVER_ERROR, "COMMON500", "서버에러"),
_BAD_REQUEST(HttpStatus.BAD_REQUEST, "COMMON400", "잘못된 요청"),
USER_NOT_FOUND(HttpStatus.BAD_REQUEST, "USER4001", "사용자가 없습니다."),
COMMENT_NOT_FOUND(HttpStatus.BAD_REQUEST, "COMMENT4001", "해당 댓글이 없습니다.") ,
PAGE_LOWER_ZERO(HttpStatus.BAD_REQUEST, "PAGE4001", "요청된 페이지가 0보다 작습니다.");
_INTERNAL_SERVER_ERROR(HttpStatus.INTERNAL_SERVER_ERROR, "COMMON5000", "서버 에러. 관리자에게 문의하세요."),
_BAD_REQUEST(HttpStatus.BAD_REQUEST, "COMMON4000", "잘못된 요청"),
_USER_NOT_FOUND(HttpStatus.BAD_REQUEST, "USER4001", "사용자가 없습니다."),
_COMMENT_NOT_FOUND(HttpStatus.BAD_REQUEST, "COMMENT4001", "해당 댓글이 없습니다.") ,
_NOTICE_NOT_FOUND(HttpStatus.BAD_REQUEST, "NOTICE4001", "해당 공지가 없습니다."),
_PAGE_LOWER_ZERO(HttpStatus.BAD_REQUEST, "PAGE4001", "요청된 페이지가 0보다 작습니다."),

// TOKEN 관련 예외
_TOKEN_NOT_VALID(HttpStatus.BAD_REQUEST, "TOKEN4001", "토큰이 유효하지 않습니다."),
_TOKEN_NOT_FOUND(HttpStatus.BAD_REQUEST, "TOKEN4002", "토큰이 존재하지 않습니다."),
_TOKEN_EXPIRED(HttpStatus.BAD_REQUEST, "TOKEN4003", "토큰이 만료되었습니다."),
_TOKEN_PAYLOAD_OR_SIGNATURE_NOT_VALID(HttpStatus.BAD_REQUEST, "TOKEN4004", "토큰의 페이로드 혹은 시그니처가 유효하지 않습니다."),
_TOKEN_HEADER_NOT_VALID(HttpStatus.BAD_REQUEST, "TOKEN4005", "토큰 헤더가 유효하지 않습니다."),

_OTP_NOT_VALID(HttpStatus.BAD_REQUEST, "OTP4001", "인증번호가 유효하지 않습니다."),
_PHONE_NUMBER_NOT_VALID(HttpStatus.BAD_REQUEST, "AUTH4001", "전화번호 형식이 유효하지 않습니다. (예: 01012341234)"),
_FAQ_NOT_FOUND(HttpStatus.NOT_FOUND, "FAQ4004", "해당 FAQ가 존재하지 않습니다."),
_SEARCH_KEYWORD_NOT_FOUND(HttpStatus.NOT_FOUND, "SEARCH_KEYWORD4004", "해당 SearchKeyword가 존재하지 않습니다."),
_FAQ_KEYWORD_NOT_FOUND(HttpStatus.NOT_FOUND, "FAQ_KEYWORD4004", "해당 FaqKeyword가 존재하지 않습니다.");


private HttpStatus httpStatus;
Expand All @@ -26,19 +40,19 @@ public enum ErrorStatus implements BaseErrorCode {
@Override
public ErrorReasonDto getReason() {
return ErrorReasonDto.builder()
.message(message)
.code(code)
.isSuccess(false)
.build();
.message(message)
.code(code)
.isSuccess(false)
.build();
}

@Override
public ErrorReasonDto getReasonHttpStatus() {
return ErrorReasonDto.builder()
.message(message)
.code(code)
.isSuccess(false)
.httpStatus(httpStatus)
.build();
.message(message)
.code(code)
.isSuccess(false)
.httpStatus(httpStatus)
.build();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import jakarta.persistence.*;
import lombok.*;
import org.hibernate.annotations.ColumnDefault;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

@Entity
@Getter
Expand All @@ -24,10 +26,11 @@ public class Category {
private Boolean isDefault;

@Column(nullable = false)
@ColumnDefault("false")
@Builder.Default
private Boolean deleted = false;

@ManyToOne(fetch = FetchType.LAZY)
@NotFound(action = NotFoundAction.IGNORE)
@JoinColumn(name = "user_id")
private User user;
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ public interface CategoryService {

List<CategoryResponseDto> getUserCategories(Long userId);

Category handleCategoryChange(Expense expense, ExpenseUpdateRequestDto request, User user);

void deleteCategory(Long id, Long userId);

Category getCategory(Long categoryId);

List<Category> getUserCategoryList(Long userId);
}

Loading

0 comments on commit 741d30a

Please sign in to comment.