Skip to content
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
92 changes: 61 additions & 31 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,32 +1,51 @@
plugins {
id 'java'
id 'org.springframework.boot' version '3.3.6'
id 'org.springframework.boot' version '3.5.9'
id 'io.spring.dependency-management' version '1.1.7'
id 'com.diffplug.spotless' version '6.25.0'
}

group = 'inha'
version = '0.0.1-SNAPSHOT'

/* ===== Java Toolchain ===== */
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
languageVersion = JavaLanguageVersion.of(25)
}
}

/* ===== Configurations ===== */
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}

/* ===== Repositories ===== */
repositories {
mavenCentral()
}

/* ===== Dependencies ===== */
/* ===== Version Pins (ν•„μš”ν•œ κ²ƒλ§Œ) ===== */
ext {
awspringBomVersion = '3.4.2'
springdocVersion = '2.8.15'
flywayVersion = '11.19.0'
postgresVersion = '42.7.3'
hibernateTypes60 = '2.21.1'
dotenvVersion = '5.2.2'
querydslVersion = '6.10.1'
jjwtVersion = '0.13.0'
}

/* ===== Vulnerability Pins (Mend 경고 제거용) ===== */
configurations.configureEach {
resolutionStrategy {
// CVE-2025-48924 λŒ€μ‘
force 'org.apache.commons:commons-lang3:3.18.0'
// CVE-2021-47621 λŒ€μ‘
force 'io.github.classgraph:classgraph:4.8.112'
}
}

dependencies {
// --- Spring Boot Starters ---
implementation 'org.springframework.boot:spring-boot-starter-web'
Expand All @@ -35,62 +54,73 @@ dependencies {
implementation 'org.springframework.boot:spring-boot-starter-oauth2-client'
implementation 'org.springframework.boot:spring-boot-starter-mail'

// --- Swagger / OpenAPI (springdoc) ---
implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:${springdocVersion}") {
exclude group: "org.apache.commons", module: "commons-lang3"
}
implementation "org.apache.commons:commons-lang3:3.18.0"

// --- DB & JPA Utils ---
implementation 'com.vladmihalcea:hibernate-types-60:2.21.1'
implementation 'org.postgresql:postgresql:42.7.3'
runtimeOnly 'com.h2database:h2' // ν…ŒμŠ€νŠΈ/둜컬용 인메λͺ¨λ¦¬ DB
implementation "com.vladmihalcea:hibernate-types-60:${hibernateTypes60}"
implementation "org.postgresql:postgresql:${postgresVersion}"
runtimeOnly 'com.h2database:h2'

// --- Querydsl (OpenFeign fork) ---
implementation "io.github.openfeign.querydsl:querydsl-jpa:${querydslVersion}"
annotationProcessor "io.github.openfeign.querydsl:querydsl-apt:${querydslVersion}:jakarta"
annotationProcessor "org.springframework.boot:spring-boot-configuration-processor"

// --- QueryDSL ---
implementation 'com.querydsl:querydsl-jpa:5.0.0:jakarta'
annotationProcessor 'com.querydsl:querydsl-apt:5.0.0:jakarta'
annotationProcessor 'jakarta.annotation:jakarta.annotation-api'
annotationProcessor 'jakarta.persistence:jakarta.persistence-api'
// Querydsl APT helper APIs (컴파일 νƒ€μž„λ§Œ)
compileOnly 'jakarta.annotation:jakarta.annotation-api'
compileOnly 'jakarta.persistence:jakarta.persistence-api'
Comment on lines +68 to +75
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟑 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Explore repository structure first
echo "=== Repository structure ==="
find . -type f -name "build.gradle" | head -5
ls -la | grep -E "src|build"

echo -e "\n=== Check for QueryDSL Q-class usage ==="
rg -n "import.*\bQ[A-Z]\w*|JPAQueryFactory" src --type java -i | head -20

echo -e "\n=== Check all QueryDSL imports ==="
rg -n "querydsl|jpa\.repository" src --type java | head -20

echo -e "\n=== Check Jakarta API usage ==="
rg -n "jakarta\.(annotation|persistence)" src --type java | head -20

echo -e "\n=== Look for build/generated directory ==="
find . -path "*/build/generated*" -type d 2>/dev/null | head -10

echo -e "\n=== Check complete build.gradle file ==="
wc -l build.gradle

Repository: GDGoCINHA/24-2_GDGoC_Server

Length of output: 7703


🏁 Script executed:

#!/bin/bash
# Get more context around the QueryDSL configuration
echo "=== Full build.gradle with line numbers ==="
cat -n build.gradle | head -90

echo -e "\n=== Check for querydsl in entire build.gradle ==="
rg -n "querydsl" build.gradle

echo -e "\n=== Check for any other QueryDSL related config ==="
rg -n "JPAQueryFactory|@EnableJpaRepositories" build.gradle

Repository: GDGoCINHA/24-2_GDGoC_Server

Length of output: 4011


🏁 Script executed:

#!/bin/bash
# Check for QueryDSL configuration and Jakarta API actual usage

echo "=== Search for JPAQueryFactory bean configuration ==="
rg -n "JPAQueryFactory|@Configuration|@Bean" src/main/java --type java -A 3 | head -40

echo -e "\n=== Check entity annotations (runtime usage) ==="
rg -n "@Entity|@Table|@Column" src/main/java --type java | head -10

echo -e "\n=== Check if there's any gradle wrapper or recent build logs ==="
ls -la gradlew* 2>/dev/null || echo "No gradle wrapper"
find . -name "*.log" -type f 2>/dev/null | head -5

echo -e "\n=== Check pom.xml or any Maven config ==="
find . -name "pom.xml" 2>/dev/null

echo -e "\n=== Verify git history for this change ==="
git log --oneline -20 build.gradle 2>/dev/null || echo "Not a git repo or no history"
</script>

Repository: GDGoCINHA/24-2_GDGoC_Server

Length of output: 4846


🏁 Script executed:

#!/bin/bash
# Fix the previous script and check for JPAQueryFactory bean definition

echo "=== Search specifically for JPAQueryFactory bean ==="
find src -name "*.java" -type f -exec grep -l "JPAQueryFactory" {} \; | xargs grep -A 10 "@Bean" | grep -A 10 "JPAQueryFactory"

echo -e "\n=== Check if there's a QueryDSL config class ==="
find src -name "*.java" -type f -exec grep -l "QuerydslConfig\|QueryDslConfig" {} \;

echo -e "\n=== Look for Spring Data QueryDSL repository configuration ==="
rg -n "@EnableJpaRepositories|QuerydslPredicateExecutor" src/main/java --type java -B 2

echo -e "\n=== Check what Spring Boot version brings in ==="
grep "spring-boot" build.gradle | head -3

echo -e "\n=== Check if jakarta.persistence is transitive from spring-boot-starter-data-jpa ==="
echo "Checking build.gradle for explicit spring-boot-starter-data-jpa..."
rg -n "spring-boot-starter-data-jpa" build.gradle

Repository: GDGoCINHA/24-2_GDGoC_Server

Length of output: 1186


🏁 Script executed:

#!/bin/bash
# Read the QueryDslConfig file to understand the full context

echo "=== Read QueryDslConfig.java ==="
cat -n src/main/java/inha/gdgoc/global/config/querydsl/QueryDslConfig.java

echo -e "\n=== Check Jakarta API transitive dependency from spring-boot-starter-data-jpa ==="
echo "Spring Boot 3.5.9 includes spring-data-jpa which transitively includes jakarta.persistence"
echo "Source: Spring Boot 3.5.x BOM management"

echo -e "\n=== Verify OpenFeign fork QueryDSL provides com.querydsl packages ==="
echo "The OpenFeign fork (io.github.openfeign.querydsl) is a drop-in replacement for com.querydsl"
echo "It provides the same com.querydsl.* package structure"

echo -e "\n=== Check if compileOnly configuration would cause issues ==="
echo "If jakarta.persistence is only available at compile-time but not runtime:"
echo "- Entity annotations would fail to load at runtime"
echo "- JPAQueryFactory initialization would fail"
echo "- The application would not start"
</script>

Repository: GDGoCINHA/24-2_GDGoC_Server

Length of output: 1568


🏁 Script executed:

cat -n src/main/java/inha/gdgoc/global/config/querydsl/QueryDslConfig.java

Repository: GDGoCINHA/24-2_GDGoC_Server

Length of output: 715


OpenFeign fork λ§ˆμ΄κ·Έλ ˆμ΄μ…˜μ€ μ μ ˆν•˜λ©°, Jakarta API μ˜μ‘΄μ„± ꡬ성을 μ •λ¦¬ν•˜μ„Έμš”.

OpenFeign fork(io.github.openfeign.querydsl)둜의 λ§ˆμ΄κ·Έλ ˆμ΄μ…˜μ€ Spring Boot 3.5.9의 Jakarta μš”κ΅¬μ‚¬ν•­μ„ λ§Œμ‘±ν•˜λŠ” μ˜¬λ°”λ₯Έ μ„ νƒμž…λ‹ˆλ‹€. μ½”λ“œμ—μ„œ QueryDSL이 μ •μƒμ μœΌλ‘œ μž‘λ™ν•˜κ³  μžˆμŠ΅λ‹ˆλ‹€.

λ‹€λ§Œ Jakarta API μ˜μ‘΄μ„± 선언에 λ¬Έμ œκ°€ μžˆμŠ΅λ‹ˆλ‹€:

  • jakarta.persistence-apiλŠ” μ—”ν‹°ν‹° ν΄λž˜μŠ€μ—μ„œ λŸ°νƒ€μž„μ— μ‚¬μš©λ˜μ§€λ§Œ(@Entity, @Table, @Column λ“±), compileOnly둜 μ„ μ–Έλ˜μ–΄ μžˆμŠ΅λ‹ˆλ‹€.
  • μ‹€μ œλ‘œλŠ” spring-boot-starter-data-jpaκ°€ jakarta.persistenceλ₯Ό λŸ°νƒ€μž„μ— 이미 μ œκ³΅ν•˜λ―€λ‘œ μž‘λ™ν•˜μ§€λ§Œ, ꡬ성이 ν˜Όλž€μŠ€λŸ½μŠ΅λ‹ˆλ‹€.
  • 주석 "컴파일 νƒ€μž„λ§Œ"은 λΆ€μ •ν™•ν•©λ‹ˆλ‹€.

κ°œμ„  λ°©μ•ˆ:

  • jakarta.persistence-apiλ₯Ό μ œκ±°ν•˜κ³  spring-boot-starter-data-jpa의 좔이적 μ˜μ‘΄μ„±μ—λ§Œ μ˜μ‘΄ν•˜κ±°λ‚˜
  • compileOnlyλ₯Ό implementation으둜 λ³€κ²½ν•˜μ—¬ λŸ°νƒ€μž„ ν•„μš”μ„±μ„ λͺ…ν™•νžˆ ν•˜κ³  주석을 μˆ˜μ •ν•˜μ„Έμš”.
πŸ€– Prompt for AI Agents
In @build.gradle around lines 68 - 75, The jakarta.persistence dependency is
incorrectly marked as compileOnly and the comment "컴파일 νƒ€μž„λ§Œ" is misleading;
either remove the explicit 'jakarta.persistence:jakarta.persistence-api' entry
so you rely on the transitive jakarta.persistence provided by
spring-boot-starter-data-jpa, or change its configuration from compileOnly to
implementation if you want it declared explicitly, and update the comment
accordingly; locate the dependency declaration for
'jakarta.persistence:jakarta.persistence-api' in the build.gradle alongside the
Querydsl entries (and the comment "Querydsl APT helper APIs (컴파일 νƒ€μž„λ§Œ)") and
apply one of the two fixes.


// --- JWT (JJWT 0.9.x, λ ˆκ±°μ‹œ νŒ¨ν‚€μ§€) ---
implementation 'io.jsonwebtoken:jjwt:0.9.1'
// --- JWT ---
implementation "io.jsonwebtoken:jjwt-api:${jjwtVersion}"
runtimeOnly "io.jsonwebtoken:jjwt-impl:${jjwtVersion}"
runtimeOnly "io.jsonwebtoken:jjwt-jackson:${jjwtVersion}"

// --- AWS (S3) ---
implementation 'io.awspring.cloud:spring-cloud-aws-starter-s3'

// --- Flyway (DB Migration) ---
implementation "org.flywaydb:flyway-core:10.21.0"
implementation "org.flywaydb:flyway-database-postgresql:10.21.0"
// --- Flyway ---
implementation "org.flywaydb:flyway-core:${flywayVersion}"
implementation "org.flywaydb:flyway-database-postgresql:${flywayVersion}"

// --- ν™˜κ²½λ³€μˆ˜(.env) ---
implementation 'io.github.cdimascio:java-dotenv:5.2.2'
implementation "io.github.cdimascio:java-dotenv:${dotenvVersion}"

// --- Lombok ---
compileOnly 'org.projectlombok:lombok'
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'

// --- Test ---
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.mockito:mockito-core:5.6.0'
testImplementation 'org.mockito:mockito-junit-jupiter:5.6.0'
testImplementation 'org.assertj:assertj-core:3.24.2'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'

// swagger
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.6.0'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}

dependencyManagement {
imports {
mavenBom "io.awspring.cloud:spring-cloud-aws-dependencies:3.1.1"
// ↑ 3.x λŒ€ μ‚¬μš© (ν”„λ‘œμ νŠΈμ— λ§žλŠ” μ΅œμ‹  3.x κ°€λŠ₯)
mavenBom "io.awspring.cloud:spring-cloud-aws-dependencies:${awspringBomVersion}"
}
}

/* ===== Tasks ===== */
spotless {
java {
googleJavaFormat('1.22.0')
target 'src/**/*.java'
}
}

// ν…ŒμŠ€νŠΈ: ν”„λ‘œν•„κ³Ό JUnit ν”Œλž«νΌ ν•œ κ³³μ—μ„œ μ„€μ •
tasks.test {
useJUnitPlatform()
systemProperty "spring.profiles.active", "test"
}

// QueryDSL 생성물 경둜 κ³ μ •
tasks.withType(JavaCompile).configureEach {
options.annotationProcessorGeneratedSourcesDirectory = file("build/generated/sources/annotationProcessor/java/main")
options.generatedSourceOutputDirectory.set(file("build/generated/sources/annotationProcessor/java/main"))
}


2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Explore gradle and build configuration files
echo "=== Searching for build configuration files ==="
find . -maxdepth 3 -type f \( -name "build.gradle*" -o -name "settings.gradle*" -o -name "gradle.properties" \) | head -20

Repository: GDGoCINHA/24-2_GDGoC_Server

Length of output: 151


🏁 Script executed:

#!/bin/bash
# Check for Spring Boot version and plugins in build files
echo "=== Examining build configuration ==="
find . -maxdepth 3 -type f -name "build.gradle*" -exec echo "File: {}" \; -exec head -50 {} \;

Repository: GDGoCINHA/24-2_GDGoC_Server

Length of output: 1190


🌐 Web query:

Gradle 9.1.0 breaking changes compatibility Java Spring Boot

πŸ’‘ Result:

Short summary β€” what changed in Gradle 9.1.0 that can break Java / Spring Boot builds, and what to do

  • Key breaking/runtime changes you must check:

    • Gradle 9.x requires a JVM β‰₯ 17 to run the Gradle daemon (you can still target older Java via toolchains). (docs.gradle.org)
    • Gradle 9.1 adds language/runtime changes (Kotlin embedded bumped, stricter Kotlin DSL typing) that can make plugins/build scripts fail to compile. (docs.gradle.org)
    • Default reproducible archives, file-order/timestamp/permission changes may affect tasks that rely on non‑deterministic JAR/ZIP contents. (gradle.org)
    • API surface changes (some methods made final / other deprecated APIs removed) and new APIs (e.g. AttributeContainer.addAllLater) may break third‑party or in‑repo plugins. (docs.gradle.org)
    • Configuration‑cache and other internal improvements: some custom task/plugin code may require adaptation. (docs.gradle.org)
  • Java 25 support caveat

    • Gradle 9.1.0 advertises support for Java 25, but there are user/issue reports that Java 25 may still be flagged as β€œincompatible” in some contexts (e.g. with certain Kotlin plugins / IDE sync). Test carefully; don’t assume Java 25 is fully smooth in your toolchain yet. (docs.gradle.org)
  • Spring Boot compatibility

    • Official Spring Boot docs (system requirements and Gradle plugin docs) list explicit support for Gradle 7.x (7.5+) and 8.x. Spring Boot documentation does not yet claim Gradle 9.x support β€” so upgrading a Spring Boot project to use Gradle 9.1 may run into unsupported-plugin or plugin‑API issues. For production Spring Boot projects prefer to stay on the highest Gradle version that Spring Boot documents as supported (or verify plugin support for your Spring Boot version). (docs.enterprise.spring.io)
  • Practical checklist before upgrading to Gradle 9.1.0

    1. Ensure Gradle daemon will run on JDK β‰₯ 17 (set CI runners / IDE Gradle JVM accordingly). (docs.gradle.org)
    2. Run ./gradlew wrapper --gradle-version=9.1.0 in a branch and run a full CI build, tests, bootJar/bootRun, and any custom plugin tasks. Fix Kotlin DSL/type errors and any deprecated-API failures. (docs.gradle.org)
    3. Verify Spring Boot Gradle plugin tasks (bootJar, bootRun, dependency management) and any Spring Boot community plugins you use still work; if not, stay on Gradle 8.x until an official Spring Boot statement or plugin update adds Gradle 9 support. (docs.enterprise.spring.io)
    4. If you rely on Java 25, test IDE sync (IntelliJ/Gradle Tooling API), Kotlin compilation, and plugin behavior β€” watch for the reported incompatibility. (github.com)

If you want, I can:

  • check your build.gradle / settings and list likely incompatibilities for Gradle 9.1, or
  • run a short compatibility checklist for a given Spring Boot and Java version you use (tell me your Spring Boot version, Gradle plugin version, and JDK versions).

Citations:


🌐 Web query:

Spring Boot 3.5.9 Gradle 9.1.0 compatibility

πŸ’‘ Result:

Short answer: Spring Boot 3.5.9 does not officially list Gradle 9.1.0 as a supported build tool β€” the 3.5.x docs specify Gradle 7.x and 8.x as the supported ranges. Gradle 9 support was introduced with the Spring Boot 4.x line, so Gradle 9.x is officially supported starting in 4.0.0. [1][2][3]

Recommendation: use a Gradle 8.x wrapper (one of the 8.x versions the 3.5 docs call out) for guaranteed support with Spring Boot 3.5.9; you can try Gradle 9.1.0 (it may work thanks to Gradle backward compatibility) but it would be unsupported β€” test your build and CI thoroughly if you go that route. [1][2][3]

Sources:

  • Spring Boot 3.5.x system requirements (Gradle 7.x / 8.x). [1]
  • Spring Boot 3.5.9 release announcement. [2]
  • Spring Boot 4.x notes stating Gradle 9 support was added in 4.0.0. [3]

Gradle 9.1.0은 Spring Boot 3.5.9와 κ³΅μ‹μ μœΌλ‘œ λ―Έμ§€μ›λ˜λ―€λ‘œ ν˜Έν™˜μ„± 검증이 ν•„μˆ˜μž…λ‹ˆλ‹€.

Spring Boot 3.5.9λŠ” Gradle 7.x(7.5+)와 8.x만 곡식 μ§€μ›ν•˜λ©°, Gradle 9.x 지원은 Spring Boot 4.0.0λΆ€ν„° μΆ”κ°€λ˜μ—ˆμŠ΅λ‹ˆλ‹€. ν˜„μž¬ μ„€μ •μ˜ Gradle 9.1.0 + Spring Boot 3.5.9 쑰합은 κ³΅μ‹μ μœΌλ‘œ λ―Έμ§€μ›λ©λ‹ˆλ‹€. λ˜ν•œ ν”„λ‘œμ νŠΈμ˜ Java 25 섀정은 Gradle 9.1.0κ³Ό Kotlin ν”ŒλŸ¬κ·ΈμΈμ—μ„œ ν˜Έν™˜μ„± λ¬Έμ œκ°€ λ³΄κ³ λ˜μ—ˆμœΌλ―€λ‘œ μ£Όμ˜κ°€ ν•„μš”ν•©λ‹ˆλ‹€.

λ‹€μŒ 쀑 ν•˜λ‚˜λ₯Ό ꢌμž₯ν•©λ‹ˆλ‹€:

  • Gradle 8.x의 μ΅œμ‹  λ²„μ „μœΌλ‘œ λ‹€μš΄κ·Έλ ˆμ΄λ“œ (ꢌμž₯: μ•ˆμ •μ μΈ 지원)
  • Spring Boot 4.0.0 μ΄μƒμœΌλ‘œ μ—…κ·Έλ ˆμ΄λ“œ (Gradle 9.x 곡식 지원)

ν˜„μž¬ μ‘°ν•©μœΌλ‘œ μ§„ν–‰ν•˜λ €λ©΄ 전체 λΉŒλ“œ, ν…ŒμŠ€νŠΈ, bootJar/bootRun을 ν¬ν•¨ν•œ μ™„μ „ν•œ CI 검증이 ν•„μˆ˜μž…λ‹ˆλ‹€.

networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
10 changes: 4 additions & 6 deletions src/main/java/inha/gdgoc/domain/resource/service/S3Service.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package inha.gdgoc.domain.resource.service;

import inha.gdgoc.domain.resource.enums.S3KeyType;
import inha.gdgoc.global.config.s3.S3Properties;
import java.io.IOException;
import java.util.UUID;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import software.amazon.awssdk.core.sync.RequestBody;
Expand All @@ -17,16 +17,14 @@
public class S3Service {

private final S3Client s3Client;

@Value("${cloud.aws.s3.bucket}")
private String bucketName;
private final S3Properties s3Properties;

public String upload(Long userId, S3KeyType s3key, MultipartFile file) throws IOException {
String fileName = UUID.randomUUID() + "-" + file.getOriginalFilename();
String key = "user/%d/%s/%s".formatted(userId, s3key.getValue(), fileName);

PutObjectRequest putReq = PutObjectRequest.builder()
.bucket(bucketName)
.bucket(s3Properties.getBucket())
.key(key)
.contentType(file.getContentType())
.build();
Expand All @@ -37,7 +35,7 @@ public String upload(Long userId, S3KeyType s3key, MultipartFile file) throws IO

public String getS3FileUrl(String key) {
return s3Client.utilities()
.getUrl(GetUrlRequest.builder().bucket(bucketName).key(key).build())
.getUrl(GetUrlRequest.builder().bucket(s3Properties.getBucket()).key(key).build())
.toExternalForm();
}
}
14 changes: 14 additions & 0 deletions src/main/java/inha/gdgoc/global/config/s3/S3Properties.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package inha.gdgoc.global.config.s3;

import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Getter
@Setter
@Component
@ConfigurationProperties("app.s3")
public class S3Properties {
private String bucket;
}
22 changes: 12 additions & 10 deletions src/main/resources/application-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,18 @@ spring:
auth: true
starttls:
enable: true
cloud:
aws:
credentials:
access-key: ${AWS_ACCESS_KEY_ID}
secret-key: ${AWS_SECRET_ACCESS_KEY}
region:
static: ${AWS_REGION}


app:
s3:
bucket: ${AWS_TEST_RESOURCE_BUCKET}

logging:
level:
Expand All @@ -62,13 +74,3 @@ jwt:
googleIssuer: ${GOOGLE_ISSUER}
selfIssuer: ${SELF_ISSUER}
secretKey: ${SECRET_KEY}

cloud:
aws:
credentials:
access-key: ${AWS_ACCESS_KEY_ID}
secret-key: ${AWS_SECRET_ACCESS_KEY}
region:
static: ${AWS_REGION}
s3:
bucket: ${AWS_TEST_RESOURCE_BUCKET}
20 changes: 11 additions & 9 deletions src/main/resources/application-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,17 @@ spring:
auth: true
starttls:
enable: true
cloud:
aws:
credentials:
access-key: ${AWS_ACCESS_KEY_ID}
secret-key: ${AWS_SECRET_ACCESS_KEY}
region:
static: ${AWS_REGION}

app:
s3:
bucket: ${AWS_TEST_RESOURCE_BUCKET}

google:
client-id: ${GOOGLE_CLIENT_ID}
Expand All @@ -61,12 +72,3 @@ jwt:
selfIssuer: ${SELF_ISSUER}
secretKey: ${SECRET_KEY}

cloud:
aws:
credentials:
access-key: ${AWS_ACCESS_KEY_ID}
secret-key: ${AWS_SECRET_ACCESS_KEY}
region:
static: ${AWS_REGION}
s3:
bucket: ${AWS_TEST_RESOURCE_BUCKET}
20 changes: 11 additions & 9 deletions src/main/resources/application-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,17 @@ spring:
auth: true
starttls:
enable: true
cloud:
aws:
credentials:
access-key: ${AWS_ACCESS_KEY_ID}
secret-key: ${AWS_SECRET_ACCESS_KEY}
region:
static: ${AWS_REGION}

app:
s3:
bucket: ${AWS_RESOURCE_BUCKET}

logging:
level:
Expand All @@ -64,12 +75,3 @@ jwt:
selfIssuer: ${SELF_ISSUER}
secretKey: ${SECRET_KEY}

cloud:
aws:
credentials:
access-key: ${AWS_ACCESS_KEY_ID}
secret-key: ${AWS_SECRET_ACCESS_KEY}
region:
static: ${AWS_REGION}
s3:
bucket: ${AWS_RESOURCE_BUCKET}
21 changes: 12 additions & 9 deletions src/test/resources/application-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,18 @@ spring:
main:
allow-bean-definition-overriding: true

cloud:
aws:
credentials:
access-key: test
secret-key: test
region:
static: ap-northeast-2

app:
s3:
bucket: test-bucket

logging:
level:
org.hibernate.SQL: warn
Expand All @@ -61,12 +73,3 @@ jwt:
selfIssuer: test-self-issuer
secretKey: MDEyMzQ1Njc4OWFiY2RlZjAxMjM0NTY3ODlhYmNkZWY=

cloud:
aws:
credentials:
access-key: test
secret-key: test
region:
static: ap-northeast-2
s3:
bucket: test-bucket
Loading