250x250
반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 |
Tags
- MUI
- RDS
- docker
- EC2
- linux
- axios
- fastapi
- TypeScript
- springboot
- python
- React
- ngrok
- js
- Java
- Troubleshooting
- AWS
- Spring
- nodejs
- webhook
- deploy
- Express
- Jenkins
- Github Actions
- macbook
- github
- AWS EC2
- MongoDB
- 500
- error
- javascript
Archives
- Today
- Total
BEAT A SHOTGUN
[TROUBLESHOOTING] 500 ERROR - cannot deserialize from object value 본문
TROUBLESHOOTING
[TROUBLESHOOTING] 500 ERROR - cannot deserialize from object value
thovy 2022. 10. 21. 17:12728x90
반응형
SMALL
ERROR ❌
조금 전(2분 전) 403 ERROR
를 해결하니 500 ERROR
가 나왔다.
403 ERROR ON USER RESISTRATION
IntelliJ
터미널에는cannot deserialize from object value
라는 error 문구가 출력되었다.
THE CAUSE
내가 만든 User
모델에 빈 생성자
가 없었다.
SOLUTION ✅
- 첫번째 방법
// User.java
// lombok 을 사용한다면 "@NoArgsConstructor" annotation 추가
@NoArgsConstructor ✅
public class User{
...
또는 OR
- 두번째 방법
// User.java
// lombokr 을 사용하지 않는다면 "빈 생성자" 만들어주기
public class User{
...
✅ public User(){
}
```
이렇게 빈 생성자를 만들어주면된다.
jackson library
가 빈 생성자가 없는 모델(user) 를 만들 수 없기 때문이다! 라고 합니다.
끝
어쩐지 test 코드는 너무 잘 작동하는데 swagger
는 안 되더라.
어쨋든 잘 돌아간다.
728x90
반응형
LIST
'TROUBLESHOOTING' 카테고리의 다른 글
[ERROR] 'getOptionLabel' method error ... on Material-ui 'Autocomplete' component (0) | 2022.11.13 |
---|---|
[ERROR] Set up a proxy and set up multiple proxies (0) | 2022.11.11 |
[TROUBLESHOOTING] 403 ERROR ON USER RESISTRATION (0) | 2022.10.21 |
[TROUBLESHOOTING] Error executing DDL "alter table post drop foreign key **** (0) | 2022.10.18 |
[IntelliJ] Set to Control Font-size with 'Ctrl + Mouse' (0) | 2022.10.14 |
Comments