My Select Shop

왕감자·2025년 2월 9일

2025 내일배움캠프

목록 보기
6/39

API 명세

상품 검색 API

기능MethodURL반환
키워드로 상품 검색GET/api/search?query=검색어List<ItemDto>

셀렉샵 API

기능MethodURL반환
관심 상품 등록POST/api/productsProductResponseDto
관심 상품의 희망 최저가 업데이트PUT/api/products/{id}ProductResponseDto
관심 상품 조회GET/api/productsList<ProductResponseDto>

회원 기능 API

기능MethodURL
로그인 페이지GET/api/user/login-page
회원가입 페이지GET/api/user/signup
회원가입POST/api/user/signup
회원 정보 요청GET/api/user-info

폴더 생성 및 조회

기능MethodURLRequestResponse
폴더 생성POST/api/folders{
folderNames:
[String, ...]
}
폴더 조회GET/api/user-folderindex.html
model 추가 → folders

관심 상품에 폴더 추가

기능MethodURLRequestResponse
폴더 전체 조회GET/api/foldersList<FolderResponseDto>
폴더 추가POST/api/products/{productId}/folder{productId}: 관심상품 ID

[Form형태]
folderId: 추가할 폴더 ID

폴더 별 관심상품 조회

기능MethodURLRequestResponse
폴더별 상품 조회GET/api/folders/{folderId}/products{folderId}: 조회를 원하는 폴더 idPage<ProductResponseDto>

application.properties
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQLDialect 추가하기
➡ Spring Boot 3.x는 spring.jpa.database-platform 대신 hibernate.dialect 속성을 사용


naver API 키 - @Value 오류 남 ➔ @ConfigurationProperties 사용

@Component
@Getter
@Setter
@ConfigurationProperties(prefix="naver.client")
public class NaverApiConfig {
    private String id;
    private String pw;
}

var : 변수 타입 자동 추론
iter : for문 자동 생성

0개의 댓글