diff --git a/customer-service/src/main/java/com/example/customerservice/contents/controller/ContentsScheduleController.java b/customer-service/src/main/java/com/example/customerservice/contents/controller/ContentsScheduleController.java index 196c3ed..ae8b398 100644 --- a/customer-service/src/main/java/com/example/customerservice/contents/controller/ContentsScheduleController.java +++ b/customer-service/src/main/java/com/example/customerservice/contents/controller/ContentsScheduleController.java @@ -9,7 +9,6 @@ import io.swagger.v3.oas.annotations.responses.ApiResponse; import lombok.RequiredArgsConstructor; import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -76,7 +75,7 @@ public ResponseEntity startBookSync() { ) } ) - @DeleteMapping("/stop") + @PostMapping("/stop") public ResponseEntity stopBookSync() { SchedulerStatus status = contentsSchedulerService.stopBookSync(); @@ -106,7 +105,7 @@ public ResponseEntity stopBookSync() { ) } ) - @PostMapping("/first/book") + @PostMapping("/first/data") public ResponseEntity saveBooksFirstData() throws JsonProcessingException { contentsSchedulerService.saveNewBookWithLimit100(); return ResponseEntity.ok("최신 도서 100권 로드 완료되었습니다."); diff --git a/customer-service/src/main/java/com/example/customerservice/contents/entity/Contents.java b/customer-service/src/main/java/com/example/customerservice/contents/entity/Contents.java index 46108d7..4d7f50e 100644 --- a/customer-service/src/main/java/com/example/customerservice/contents/entity/Contents.java +++ b/customer-service/src/main/java/com/example/customerservice/contents/entity/Contents.java @@ -22,16 +22,16 @@ public class Contents { @Column(name = "content_id") private Long contentId; - @Column(nullable = false) + @Column(nullable = false, length = 10) private String category; - @Column(nullable = false) + @Column(nullable = false, length = 100) private String title; - @Column(nullable = false) + @Column(nullable = false, length = 100) private String writer; - @Column(length = 300) + @Column(length = 500) private String summary; @Column diff --git a/customer-service/src/main/resources/application.yml b/customer-service/src/main/resources/application.yml index 3dca71d..5425ff0 100644 --- a/customer-service/src/main/resources/application.yml +++ b/customer-service/src/main/resources/application.yml @@ -8,7 +8,7 @@ spring: driver-class-name: com.mysql.cj.jdbc.Driver jpa: hibernate: - ddl-auto: create + ddl-auto: none default_batch_fetch_size: 1000 jdbc: time_zone: Asia/Seoul