본문 바로가기

백엔드4

LocalDateTime의 직렬화 및 역직렬화 실패 이슈 @DateTimeFormat의 deserialize 실패 문제상황 { "timestamp": "2023-04-11T16:33:28.312+00:00", "status": 400, "error": "Bad Request", "trace": "org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Cannot deserialize value of type `java.time.LocalDateTime` from String \\"2023-04-10'T'10:48:12\\": Failed to deserialize java.time.LocalDateTime: (java.time.format.DateTimeParse.. 2023. 4. 12.
Request를 VO가 아닌 DTO로 구현하는 이유 Chat GPT which way is better between implement request as dto and as vo? Both DTO (Data Transfer Object) and VO (Value Object) are commonly used to transfer data between layers or modules of an application. However, they have slightly different purposes and use cases.A DTO is typically used to transfer data between layers of an application or between different applications, and it is often used .. 2023. 4. 10.
"User", "Member"를 클래스 이름으로 사용하면 안 되는 이유 is it good for developer to use "User" as the name of entity class? is it good for developer to use "Member" as the name of entity class? “User”란 이름은 예약어로 사용될 가능성이 높기 때문에 되도록이면 사용하지 않는 것을 추천함. 따라서 사용자를 저장하는 클래스의 엔티티의 이름을 “User”로 하지 않는다. 이외에도 Member란 클래스의 이름도 같은 이유로 추천되는 이름은 아니다. 이것들의 대용으로 다음 같은 클래스 이름을 사용할 수 있다. “UserEntity” “MemberEntity” 2023. 4. 10.
Java Collection Framework (1) Java Collection Framework란? Collection 이란? A collection is an object that represents a group of objects (from oracle java document) In Java, a Collection is a group of multiple objects put together into a single unit. (from geekforgeeks) collection이란 오브젝트를 모아둔 것이라 생각하면 된다. 그렇다면 어떤 기준으로 오브젝트를 선별해서 모아둔 것일까? 마구잡이로 모든 객체를 모아두진 않았을 것이다. 여기서 그 기준에 대해서 생각해보면 진정으로 Java Collection Framework의 용도에 대해서 이해할.. 2023. 3. 6.