<aside>

일정 관리 앱 디밸롭 과제 링크 (repository)

https://github.com/kolyn092/ScheduleManagementDevelop.git

구현 리스트

<aside>

작업 내역


작업 의도

  1. 중복되는 필드끼리 묶어서 관리하고, 명시적으로 기능 별 dto를 생성하여 관리

    중복되는 필드를 묶어서 별도의 dto로 만들고, 명시적으로 어떤 dto인지 알기 위해 추가적인 필드가 없지만 상속을 받아서 사용했다. (**현재는 로직 변경으로 인해 사용하지 않는다)

  2. 패키지 분리 의도 (기능 별 vs 레이어 계층 별)

  3. User 데이터를 어떻게 Service 단에서 가져올 것인가

  4. 유저 수정, 삭제 기능을 사용자의 기능으로 구현할 것인가, 관리자 기능으로 구현할 것인가

  5. signup을 어떤 도메인에서 구현해야 하는가?

  6. 페이지네이션을 쿼리로 작성해서 dto로 바로 받아서 사용 vs 엔티티 객체로 받은 것을 dto로 변환해서 사용

  7. 유저 데이터를 저장하는 엔티티가 하나이고, 유저를 soft delete하고 이후에 동일 이메일로 재가입하는 경우를 어떻게 처리할 것인가


트러블 슈팅

Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception 
[Request processing failed: 
org.springframework.dao.DataIntegrityViolationException: 
not-null property references a null or transient value for entity 
com.schedule.entity.Schedule.createdAt] with root cause
Resolved [org.springframework.web.bind.ServletRequestBindingException: 
Missing session attribute 'loginUser' of type UserSession]
The dependencies of some of the beans in the application context form a cycle:
   commentController defined in file [CommentController.class]
┌─────┐
|  commentService defined in file [CommentService.class]
↑     ↓
|  scheduleService defined in file [ScheduleService.class]
└─────┘
java.sql.SQLIntegrityConstraintViolationException: 
Cannot delete or update a parent row: a foreign key constraint fails 
(`developdb`.`schedules`, CONSTRAINT `fk_schedule_user` FOREIGN KEY (`user_id`) 
REFERENCES `users` (`id`))

회고