fetch() 를 이용하면 url을 통해 원하는 API의 결과값을 받아올 수 있습니다. 그런데 js는 인터프립터 언어이기때문에 fetch를 사용하게되면 null을 반환하게 됩니다. let resopnse = fetch("http://localhost:8080/chat", { method: "post", body: JSON.stringify(chat), // JS -> JSON headers: { "Content-Type": "application/json; charset=utf-8" } }); 이때 바로 변수에 값을 할당하지 않고 fetch의 반환값이 올때까지 기다렸다 변수에 대응하게 값을 할당하는 것이 awit입니다. 즉, 통신이 끝날때까지 기다리게 됩니다. awit 적용 후 let resopnse =..
개인 프로젝트에서 Kafka를 이용해 CQRS를 적용하던 중 아래와 같은 에러가 발생하였습니다. Caused by: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "postId" (class com.example.core.domain.messaging.command.post.PostCreateMessage), not marked as ignorable (2 known properties: "postCreate", "userId"]) at [Source: (String)"{"postId":{"id":"fd94aee3-2ede-4c9a-a0b8-dd0262e73eb3"},"title":"성공인가?","c..
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'commentQueryRepositoryImpl' defined in com.example.query.infra.jpa.CommentQueryRepositoryImpl defined in @EnableJpaRepositories declared on JpaRepositoriesRegistrar.EnableJpaRepositoriesConfiguration: Not a managed type: class com.example.core.domain.comment.entity.Comment 좀더 확인해보니 Caused by: java...