Skip to content
This repository was archived by the owner on Jan 2, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
c4e63c5
๐Ÿ“ฆ Chore: Git-Action ๋“ฑ๋ก (ํ…Œ์ŠคํŠธ ์„œ๋ฒ„ ๋ฐฐํฌ) (#25)
thelightway24 Apr 18, 2025
b62fae9
โœจ Feature/#13 ์ „์—ญ ์˜ˆ์™ธ ์ฒ˜๋ฆฌ ํ‘œ์ค€ ์‘๋‹ต ํฌ๋งท ๊ธฐ๋Šฅ
chanbyoung Apr 18, 2025
5ed3650
๐Ÿšจ Hotfix: #26 ๋ฐฐํฌ ์˜ค๋ฅ˜ ํ•ด๊ฒฐ (#27)
thelightway24 Apr 18, 2025
bb2ea09
๐Ÿ“ฆChore: Test ํ™˜๊ฒฝ ์ƒํƒœ ํ™•์ธ ์˜์กด์„ฑ ์ถ”๊ฐ€ (#28)
thelightway24 Apr 18, 2025
6894f6e
Feature/#16 ๋กœ๊ทธ ๊ธฐ๋Šฅ
LEELISE Apr 21, 2025
9d0551c
โœจ Feat: ๊ณต๊ณต๋ฐ์ดํ„ฐ API ํŒŒ์‹ฑ ๊ฐœ๋ฐœ
HaechangLee Apr 22, 2025
8f90354
๐Ÿ“ฆ Chore: Git-Action ์„œ๋ฒ„์ƒํƒœ ์ฒดํฌ ์ถ”๊ฐ€ (#38)
thelightway24 Apr 22, 2025
118c1ae
โœจ Feat: JDBC ์ €์žฅ ์ถ”๊ฐ€ (#39)
thelightway24 Apr 22, 2025
9b73411
๐Ÿšจ Hotfix: ์ธํ„ฐ์…‰ํ„ฐ ์„ค์ • ์˜ค๋ฅ˜ ์ˆ˜์ • (#41)
thelightway24 Apr 22, 2025
8b5bbee
โœจFeature/#4 ๊ณต๊ณต๋ฐ์ดํ„ฐ ์ €์žฅ
thelightway24 Apr 22, 2025
822822c
โœจ Feat: #19 ๊ณต๊ณต๋ฐ์ดํ„ฐ ์ €์žฅ ๊ฐ’ ๋ฐ˜ํ™˜
thelightway24 Apr 22, 2025
e98a117
โ™ป๏ธ Refactor: ํŒจํ‚ค์ง€ ๊ตฌ์กฐ ๋ณ€๊ฒฝ
thelightway24 Apr 22, 2025
e74fc3a
Feature/ ๋ฒกํ„ฐ ๊ฒ€์ƒ‰ ๊ธฐ๋Šฅ
LEELISE Apr 25, 2025
30e935d
โœจ Feature: ee-doc ๋ฐ์ดํ„ฐ ์ธ๋ฑ์Šค ์ €์žฅ
chanbyoung Apr 25, 2025
3260388
โœจ Feature: ๋ฒกํ„ฐ ๊ฒ€์ƒ‰ ๊ธฐ๋Šฅ ์ถ”๊ฐ€
LEELISE Apr 25, 2025
4622c3d
โ™ป๏ธ Refactor: ๋ณ€๊ฒฝ๋œ ๊ตฌ์กฐ์— ๋”ฐ๋ผ ์ฝ”๋“œ๋ฅผ ์ˆ˜์ •ํ•˜์˜€์Šต๋‹ˆ๋‹ค. (#54)
LEELISE Apr 28, 2025
c753678
โœจ Feature/#52 ์ฆ์ƒ ์ž๋™์™„์„ฑ ๋ฐ ๊ฒ€์ƒ‰๊ธฐ๋Šฅ ๊ตฌํ˜„ (#55)
chanbyoung Apr 28, 2025
4fd61cb
โœจ Feat: ๊ฒ€์ƒ‰๋Œ€์ƒ ES ์ธ๋ฑ์Šค ์ง€์ • (#57)
HaechangLee Apr 29, 2025
563b5b1
โœจ Feature: #5 ์•ฝํ’ˆ๋ช… ๊ฒ€์ƒ‰ ๊ธฐ๋Šฅ (#58)
chanbyoung Apr 30, 2025
c3a459f
โœจFeature: #59 ์•ฝํ’ˆ id rdb ์กฐํšŒ (#60)
thelightway24 Apr 30, 2025
57b5a9a
โ™ป๏ธ Refactor: ์ž์—ฐ์–ด ๊ฒ€์ƒ‰ ๋กœ์ง ๋ฆฌํŒฉํ† ๋ง, ์Šค์œ„์นญ ๋กœ์ง ์ถ”๊ฐ€
LEELISE May 3, 2025
2fe63f0
โœจ Feature: #62 ์ฝ”๋“œ ํ†ตํ•ฉ (#64)
thelightway24 May 5, 2025
646937d
๐Ÿ› Fix: ์ƒ‰์ธ์„ ์œ„ํ•œ ์–ด๋Œ‘ํ„ฐ ์ด๋ฆ„ ์˜๋ฌธ ์†Œ๋ฌธ์ž๋กœ ๋ณ€๊ฒฝ (#66)
thelightway24 May 5, 2025
817db10
โ™ป๏ธ Refactor: ์ž์—ฐ์–ด ๊ฒ€์ƒ‰๋กœ์ง ๊ฒ€์ƒ‰ ์ฟผ๋ฆฌ ๊ฐœ์„ 
LEELISE May 6, 2025
751f5db
๐Ÿ› Fix: ์ž„๋ฒ ๋”ฉ adapter ๋™์ž‘ํ•˜์ง€ ์•Š๋Š” ๋ฌธ์ œ ์ˆ˜์ • (#70)
HaechangLee May 7, 2025
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
44 changes: 44 additions & 0 deletions .github/workflows/dev-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Deploy

on:
push:
branches:
- dev
paths-ignore:
- '.github/workflows/**'

jobs:
deploy:
runs-on: self-hosted

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '21'

- name: Make gradlew executable
run: chmod +x ./gradlew

- name: Build Spring Boot (JAR)
run: ./gradlew bootJar -Penv=test

- name: Copy JAR to shared volume
run: cp build/libs/*.jar /deploy/app.jar

- name: Restart Docker with New JAR
run: |
cd /deploy
docker-compose down
docker-compose up -d --build

- name: Wait for test server to be healthy
run: |
echo "๐Ÿ” Checking https://yakplus-test.techlog.dev/actuator/health ..."
curl --silent --fail \
--retry 5 --retry-connrefused --retry-delay 5 \
https://yakplus-test.techlog.dev/actuator/health
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ build/
*.iml
*.iws
*.ipr
out/
/out/
.idea/**/
.idea_modules/
.idea/httpRequests
Expand Down
21 changes: 21 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,31 @@ dependencies {
// RDB
runtimeOnly 'com.mysql:mysql-connector-j'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-xml'
implementation 'org.springframework.boot:spring-boot-starter-jdbc'

// Elastic search
implementation 'org.springframework.boot:spring-boot-starter-data-elasticsearch'
implementation 'org.elasticsearch.client:elasticsearch-rest-high-level-client:7.17.10'

//ai
implementation 'org.springframework.ai:spring-ai-openai-spring-boot-starter:1.0.0-M5'

// Swagger ์„ค์น˜
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.7.0'

// build.gradle
if (project.hasProperty('env') && project.env == 'test') {
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-actuator'
}
}
}

dependencyManagement {
imports {
mavenBom "org.springframework.ai:spring-ai-bom:1.0.0-M5"
}
}

tasks.named('test') {
Expand Down
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@

@SpringBootApplication
public class YakplusApplication {
public static void main(String[] args) {
SpringApplication.run(YakplusApplication.class, args);

}
public static void main(String[] args) {
SpringApplication.run(YakplusApplication.class, args);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
package com.likelion.backendplus4.yakplus.common.configuration;

import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

import ch.qos.logback.classic.Level;
import ch.qos.logback.classic.LoggerContext;
import ch.qos.logback.classic.encoder.PatternLayoutEncoder;
import ch.qos.logback.classic.spi.ILoggingEvent;
import ch.qos.logback.core.ConsoleAppender;
import ch.qos.logback.core.FileAppender;
import ch.qos.logback.core.rolling.TimeBasedRollingPolicy;
import ch.qos.logback.core.util.FileSize;
import jakarta.annotation.PostConstruct;

/**
* ๋กœ๊น… ์„ค์ •์„ ์œ„ํ•œ ์„ค์ • ํด๋ž˜์Šค
*
* @modified 2025-04-18
* @since 2025-04-16
*/
@Configuration
public class LogbackConfig {
@Value("${log.rolling.directory}")
private String LOG_DIRECTORY;
@Value("${log.rolling.file-name}")
private String LOG_FILE_NAME;
@Value("${log.rolling.pattern}")
private String LOG_PATTERN;
@Value("${log.rolling.max-history}")
private int MAX_HISTORY;
@Value("${log.rolling.total-size-cap}")
private String TOTAL_SIZE_CAP;

/**
* ๋กœ๊น… ์„ค์ •์„ ์ดˆ๊ธฐํ™”ํ•˜๋Š” ๋ฉ”์„œ๋“œ
*
* @author ์ •์•ˆ์‹
* @modified 2025-04-18
* @since 2025-04-16
*/
@PostConstruct
public void configure() {
LoggerContext context = initializeLoggerContext();
createLogDirectory();

ConsoleAppender<ILoggingEvent> consoleAppender = createConsoleAppender(context);
FileAppender<ILoggingEvent> fileAppender = createFileAppender(context);

configureRootLogger(context, consoleAppender, fileAppender);
}

/**
* LoggerContext๋ฅผ ์ดˆ๊ธฐํ™”ํ•˜๋Š” ๋ฉ”์„œ๋“œ
*
* @return LoggerContext ์ดˆ๊ธฐํ™”๋œ ๋กœ๊ฑฐ ์ปจํ…์ŠคํŠธ
* @author ์ •์•ˆ์‹
* @modified 2025-04-18
* @since 2025-04-16
*/
private LoggerContext initializeLoggerContext() {
LoggerContext context = (LoggerContext)LoggerFactory.getILoggerFactory();
context.reset();
return context;
}

/**
* ๋กœ๊ทธ ๋””๋ ‰ํ† ๋ฆฌ๋ฅผ ์ƒ์„ฑํ•˜๋Š” ๋ฉ”์„œ๋“œ
*
* @author ์ •์•ˆ์‹
* @modified 2025-04-18
* @since 2025-04-16
*/
private void createLogDirectory() {
Path logPath = Paths.get(LOG_DIRECTORY);
try {
if (!Files.exists(logPath)) {
Files.createDirectories(logPath);
}
} catch (Exception e) {
throw new RuntimeException("๋กœ๊ทธ ๋””๋ ‰ํ† ๋ฆฌ ์ƒ์„ฑ ์‹คํŒจ", e);
}
}

/**
* ์ฝ˜์†” ์–ดํŽœ๋”๋ฅผ ์ƒ์„ฑํ•˜๋Š” ๋ฉ”์„œ๋“œ
*
* @param context LoggerContext ๋กœ๊ฑฐ ์ปจํ…์ŠคํŠธ
* @return ConsoleAppender ์ƒ์„ฑ๋œ ์ฝ˜์†” ์–ดํŽœ๋”
* @author ์ •์•ˆ์‹
* @modified 2025-04-18
* @since 2025-04-16
*/
private ConsoleAppender<ILoggingEvent> createConsoleAppender(LoggerContext context) {
ConsoleAppender<ILoggingEvent> appender = new ConsoleAppender<>();
appender.setContext(context);
appender.setEncoder(createEncoder(context));
appender.start();
return appender;
}

/**
* ํŒŒ์ผ ์–ดํŽœ๋”๋ฅผ ์ƒ์„ฑํ•˜๋Š” ๋ฉ”์„œ๋“œ
*
* @param context LoggerContext ๋กœ๊ฑฐ ์ปจํ…์ŠคํŠธ
* @return FileAppender ์ƒ์„ฑ๋œ ํŒŒ์ผ ์–ดํŽœ๋”
* @author ์ •์•ˆ์‹
* @modified 2025-04-18
* @since 2025-04-16
*/
private FileAppender<ILoggingEvent> createFileAppender(LoggerContext context) {
FileAppender<ILoggingEvent> appender = new FileAppender<>();
appender.setContext(context);
appender.setFile(LOG_DIRECTORY + "/" + LOG_FILE_NAME);
appender.setAppend(true);
appender.setEncoder(createEncoder(context));

TimeBasedRollingPolicy<ILoggingEvent> rollingPolicy = createRollingPolicy(context, appender);
rollingPolicy.start();

appender.start();
return appender;
}

/**
* ํŒจํ„ด ๋ ˆ์ด์•„์›ƒ ์ธ์ฝ”๋”๋ฅผ ์ƒ์„ฑํ•˜๋Š” ๋ฉ”์„œ๋“œ
*
* @param context LoggerContext ๋กœ๊ฑฐ ์ปจํ…์ŠคํŠธ
* @return PatternLayoutEncoder ์ƒ์„ฑ๋œ ํŒจํ„ด ๋ ˆ์ด์•„์›ƒ ์ธ์ฝ”๋”
* @author ์ •์•ˆ์‹
* @modified 2025-04-18
* @since 2025-04-16
*/
private PatternLayoutEncoder createEncoder(LoggerContext context) {
PatternLayoutEncoder encoder = new PatternLayoutEncoder();
encoder.setContext(context);
encoder.setPattern(LOG_PATTERN);
encoder.start();
return encoder;
}

/**
* ๋กค๋ง ์ •์ฑ…์„ ์ƒ์„ฑํ•˜๋Š” ๋ฉ”์„œ๋“œ
*
* @param context LoggerContext ๋กœ๊ฑฐ ์ปจํ…์ŠคํŠธ
* @param parent FileAppender ๋ถ€๋ชจ ํŒŒ์ผ ์–ดํŽœ๋”
* @return TimeBasedRollingPolicy ์ƒ์„ฑ๋œ ๋กค๋ง ์ •์ฑ…
* @author ์ •์•ˆ์‹
* @modified 2025-04-18
* @since 2025-04-16
*/
private TimeBasedRollingPolicy<ILoggingEvent> createRollingPolicy(LoggerContext context,
FileAppender<ILoggingEvent> parent) {
TimeBasedRollingPolicy<ILoggingEvent> policy = new TimeBasedRollingPolicy<>();
policy.setContext(context);
policy.setParent(parent);
policy.setFileNamePattern(LOG_DIRECTORY + "/" + LOG_FILE_NAME.replace(".log", ".%d{yyyy-MM-dd}.log"));
policy.setMaxHistory(MAX_HISTORY);
policy.setTotalSizeCap(FileSize.valueOf(TOTAL_SIZE_CAP));
return policy;
}

/**
* ๋ฃจํŠธ ๋กœ๊ฑฐ๋ฅผ ์„ค์ •ํ•˜๋Š” ๋ฉ”์„œ๋“œ
*
* @param context LoggerContext ๋กœ๊ฑฐ ์ปจํ…์ŠคํŠธ
* @param consoleAppender ConsoleAppender ์ฝ˜์†” ์–ดํŽœ๋”
* @param fileAppender FileAppender ํŒŒ์ผ ์–ดํŽœ๋”
* @author ์ •์•ˆ์‹
* @since 2025-04-16
*/
private void configureRootLogger(LoggerContext context, ConsoleAppender<ILoggingEvent> consoleAppender,
FileAppender<ILoggingEvent> fileAppender) {
Logger logger = LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME);
if (logger instanceof ch.qos.logback.classic.Logger) {
ch.qos.logback.classic.Logger rootLogger = (ch.qos.logback.classic.Logger)logger;
rootLogger.setLevel(Level.INFO);
rootLogger.addAppender(consoleAppender);
rootLogger.addAppender(fileAppender);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package com.likelion.backendplus4.yakplus.common.configuration;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;


import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Info;

@Configuration
public class SwaggerConfig {

@Bean
public OpenAPI openAPI() {
return new OpenAPI()
.info(new Info()
.title("YakPlus API")
.description("YakPlus ํ”„๋กœ์ ํŠธ์˜ API ๋ฌธ์„œ์ž…๋‹ˆ๋‹ค.")
.version("1.0.0"));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
package com.likelion.backendplus4.yakplus.common.configuration;

import com.likelion.backendplus4.yakplus.common.interceptor.LogInterceptor;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
* ์›น ์„ค์ •์„ ์œ„ํ•œ ์„ค์ • ํด๋ž˜์Šค
*
* @modified 2025-04-18
* @since 2025-04-16
*/
@Configuration
@RequiredArgsConstructor
public class WebConfig implements WebMvcConfigurer {

private static final String ALL_PATTERN = "/**";

private final LogInterceptor logInterceptor;

/**
* ์ธํ„ฐ์…‰ํ„ฐ๋ฅผ ๋“ฑ๋กํ•˜๋Š” ๋ฉ”์„œ๋“œ
*
* @param registry InterceptorRegistry ์ธํ„ฐ์…‰ํ„ฐ ๋ ˆ์ง€์ŠคํŠธ๋ฆฌ
* @author ์ •์•ˆ์‹
* @modified 2025-04-18
* @since 2025-04-16
*/
@Override
public void addInterceptors(InterceptorRegistry registry) {
// ๋ชจ๋“  ์š”์ฒญ์— ๋Œ€ํ•ด LogInterceptor๋ฅผ ์ ์šฉ
registry.addInterceptor(logInterceptor)
.addPathPatterns(ALL_PATTERN); // ๋ชจ๋“  URL ํŒจํ„ด์— ์ ์šฉ
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package com.likelion.backendplus4.yakplus.common.exception;


import com.likelion.backendplus4.yakplus.common.exception.error.ErrorCode;

/**
* ์‚ฌ์šฉ์ž ์ •์˜ ์˜ˆ์™ธ์˜ ์ถ”์ƒ ํด๋ž˜์Šค ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ์ „์—ญ์—์„œ ์‚ฌ์šฉํ•˜๋Š” ๊ณตํ†ต ์˜ˆ์™ธ ์ƒ์œ„ ํƒ€์ž…์ด๋‹ค.
*
* @modified 2025-04-18
* @since 2025-04-16
*/
public abstract class CustomException extends RuntimeException {

/**
* ์ƒ์„ฑ์ž - ErrorCode์˜ ๋ฉ”์‹œ์ง€๋ฅผ ๊ธฐ๋ฐ˜์œผ๋กœ ์˜ˆ์™ธ ๋ฉ”์‹œ์ง€๋ฅผ ์„ค์ •ํ•œ๋‹ค.
*
* @param errorCode ErrorCode ๊ฐ์ฒด
* @author ๋ฐ•์ฐฌ๋ณ‘
* @modified 2025-04-18 ๋ฐ•์ฐฌ๋ณ‘
* @since 2025-04-16
*/
public CustomException(ErrorCode errorCode) {
super(errorCode.message());
}

/**
* ErrorCode ๋ฐ˜ํ™˜
*
* @return ErrorCode ๊ฐ์ฒด
* @author ๋ฐ•์ฐฌ๋ณ‘
* @modified 2025-04-18 ๋ฐ•์ฐฌ๋ณ‘
* @since 2025-04-16
*/
public abstract ErrorCode getErrorCode();
}
Loading