Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
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: 1 addition & 1 deletion .gradle/buildOutputCleanup/cache.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#Fri Feb 07 20:37:40 KST 2025
#Sat Feb 15 09:08:54 KST 2025
gradle.version=8.10
Binary file modified .gradle/buildOutputCleanup/outputFiles.bin
Binary file not shown.
33 changes: 21 additions & 12 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,36 +24,45 @@ repositories {
}

dependencies {
// Spring Boot Starters
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
// ✅ Spring Boot 기본 스타터 패키지
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'org.springframework.boot:spring-boot-starter-logging'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-aop'
implementation 'org.springframework.boot:spring-boot-starter-webflux'
implementation 'org.springframework.boot:spring-boot-starter-webflux' // ✅ WebClient 추가

// ✅ 데이터베이스 관련
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'com.mysql:mysql-connector-j'

// ✅ 보안 관련
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'io.jsonwebtoken:jjwt:0.12.3' // ✅ JWT 토큰 생성을 위한 라이브러리
implementation 'com.fasterxml.jackson.core:jackson-databind'

// Selenium for web scraping
// Selenium 웹 스크래핑
implementation 'org.seleniumhq.selenium:selenium-java:4.26.0'

// OpenAPI documentation
// OpenAPI 문서 자동화 (Swagger UI)
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0'

// MySQL Driver
implementation 'com.mysql:mysql-connector-j'

// Lombok for reducing boilerplate code
// ✅ Lombok (코드 간소화)
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'

implementation 'org.springframework.boot:spring-boot-starter-security'
// ✅ 로깅 및 JSON 처리
implementation 'com.fasterxml.jackson.core:jackson-databind'

// Testing
// ✅ 쿠팡 파트너스 API 관련
implementation 'org.apache.httpcomponents.client5:httpclient5' // HTTP 요청을 위한 라이브러리

// ✅ 테스트 관련
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.security:spring-security-test'
}

tasks.named('test') {
useJUnitPlatform()
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package com.team4.giftidea.controller;

import com.team4.giftidea.service.CoupangPartnersService;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/api/coupang")
public class CoupangPartnersController {

private final CoupangPartnersService coupangPartnersService;

public CoupangPartnersController(CoupangPartnersService coupangPartnersService) {
this.coupangPartnersService = coupangPartnersService;
}

/**
* DB의 모든 쿠팡 상품을 조회하여 파트너스 링크로 업데이트하는 API
*/
@PostMapping("/update-all")
public ResponseEntity<String> updateAllCoupangProductLinks() {
int updatedCount = coupangPartnersService.updateAllCoupangProductLinks();
return ResponseEntity.ok(updatedCount + "개의 쿠팡 상품이 업데이트되었습니다.");
}
}
Loading
Loading