강의

멘토링

커뮤니티

Inflearn Community Q&A

oremopro1975's profile image
oremopro1975

asked

[The concept is easy~, the practice is intense] Spring Boot, introduction!

22강 질문입니다..

Written on

·

246

0

22강 테스트 코드에서 계속 에러가 납니다..
그래서 강사님 코드를 복붙했는데도 계속 에러가 납니다..
 
 
1. 특정 게스트의 모든 댓글 조회
org.opentest4j.AssertionFailedError: 4번 글의 모든 댓글을 출력! ==> Expected :[Comment(id=1, article=Article(id=4, title=당신의 인생영화는?, content=댓글 ㄱ), nickname=park, body=굿윌헌팅), Comment(id=2, article=Article(id=4, title=당신의 인생영화는?, content=댓글 ㄱ), nickname=Kim, body=헌트), Comment(id=3, article=Article(id=4, title=당신의 인생영화는?, content=댓글 ㄱ), nickname=lee, body=아임샘)] Actual :[Comment(id=1, article=Article(id=4, title=당신의 인생영화는?, content=댓글 ㄱ), nickname=park, body=굿윌헌팅), Comment(id=2, article=Article(id=4, title=당신의 인생영화는?, content=댓글 ㄱ), nickname=kim, body=헌트), Comment(id=3, article=Article(id=4, title=당신의 인생영화는?, content=댓글 ㄱ), nickname=lee, body=아임샘)] <Click to see difference>
 
2. 특정 닉네임 조회시
org.springframework.dao.InvalidDataAccessApiUsageException: Could not locate ordinal parameter [1], expecting one of []; nested exception is java.lang.IllegalArgumentException: Could not locate ordinal parameter [1], expecting one of []
 
이런 에러가 납니다..
 
원인이 몰까요???? 제가 몰 잘못했을까요???
orm도 복붙해봤는데도 계속 에러가 납니다...
 
답변 해주시면 감사하겠습니다..
 
 
testspring-boot

Answer 2

0

oremopro1975님의 프로필 이미지
oremopro1975
Questioner

자문자답입니다..

CommentRepository에 @Param("nickname")을 붙이지 정상 작동하네요

감사합니다

0

hongpark님의 프로필 이미지
hongpark
Instructor

1. 틀린 글자 찾기

실제값과 기대값에서 무엇이 틀린지 찾아보세요

 

2. 구글링 하기

"could not locate ordinal parameter 1 expecting one of"

로 구글링해서 문제를 해결해보세요

oremopro1975's profile image
oremopro1975

asked

Ask a question