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 |
Tags
- 자료구조
- 디자인패턴
- 자바
- springboot
- pscp
- mycp
- setParameter
- java
- 여러인수
- BubbleSorting
- 데코레이터패턴
- Linux
- 숫자야구
- 점세개
- decorator
- NamedParameterNotBound
- @ModelAttribute
- gradle
- C
- createQuery
- @NotEmpty
- designpattern
- 백준
- 쉬운 계단 수
- Spring
- 10951
- junit
- @Spring
- 10844
- 전치행렬 #C
Archives
- Today
- Total
...
[JAVA/Spring] 단위테스트 상 Repository에서 NullPointerException이 발생할 때 본문
[ 확인해 보아야 할 것 ]
1. EntityManager가 final로 선언되어 있으며, em을 할당할 Constructor가 존재하는가?

2. RunWith(SpringRunner)가 선언되어 의존성 주입을 올바르게 받았는가?
3. Repository 앞에 @Autowired 어노테이션이 붙어있는가?

'이것저것 > 오류 해결' 카테고리의 다른 글
[mysql/spring/jpa] Caused by: java.sql.SQLException: No database selected 해결 (2) | 2022.06.06 |
---|---|
[Spring/JPA/MySql] org.h2.jdbc.jdbcsqlsyntaxerrorexception 에러 해결........ (0) | 2022.05.25 |
[Gradle/Spring]finished with non-zero exit value 1 오류 해결 (0) | 2022.05.04 |
[Spring Boot] @NotEmpty 어노테이션이 import 되지 않을 때 (0) | 2022.04.17 |
[JUnit]Named parameter not bound 에러 (0) | 2022.04.17 |