| 기능 | Method | URL | 반환 |
|---|---|---|---|
| 키워드로 상품 검색 | GET | /api/search?query=검색어 | List<ItemDto> |
| 기능 | Method | URL | 반환 |
|---|---|---|---|
| 관심 상품 등록 | POST | /api/products | ProductResponseDto |
| 관심 상품의 희망 최저가 업데이트 | PUT | /api/products/{id} | ProductResponseDto |
| 관심 상품 조회 | GET | /api/products | List<ProductResponseDto> |
| 기능 | Method | URL |
|---|---|---|
| 로그인 페이지 | GET | /api/user/login-page |
| 회원가입 페이지 | GET | /api/user/signup |
| 회원가입 | POST | /api/user/signup |
| 회원 정보 요청 | GET | /api/user-info |
| 기능 | Method | URL | Request | Response |
|---|---|---|---|---|
| 폴더 생성 | POST | /api/folders | { folderNames: [String, ...] } | |
| 폴더 조회 | GET | /api/user-folder | index.html model 추가 → folders |
| 기능 | Method | URL | Request | Response |
|---|---|---|---|---|
| 폴더 전체 조회 | GET | /api/folders | List<FolderResponseDto> | |
| 폴더 추가 | POST | /api/products/{productId}/folder | {productId}: 관심상품 ID [Form형태] folderId: 추가할 폴더 ID |
| 기능 | Method | URL | Request | Response |
|---|---|---|---|---|
| 폴더별 상품 조회 | GET | /api/folders/{folderId}/products | {folderId}: 조회를 원하는 폴더 id | Page<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문 자동 생성