개발 기록

Type definition error: [simple type, 본문

JAVA/스프링

Type definition error: [simple type,

수염차 2023. 2. 17. 00:26

https://stackoverflow.com/questions/51014320/spring-type-definition-error-when-posting-a-new-object-using-a-rest-\service

 

Spring: Type definition error when posting a new object using a REST service

I have an object which gets two parameters through a json POST request to create a new entry in the database and I get this error: "Type definition error: [simple type, class ffuentese.rest_ex...

stackoverflow.com

 

controller 테스트를 하던 중 오류 발생.

 

Caused by: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of `com.numble.banking.user.application.port.in.UserCommand` (no Creators, like default constructor, exist): cannot deserialize from Object value (no delegate- or property-based Creator)

 

생성자가 없단다 전송 객체에 @NoArgsConstructor 추가!

Comments