2021-07-19 02:06:06.264 ERROR 1 --- [nio-8080-exec-8] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.NullPointerException] with root cause
버그 원인 : request의 문자열이 null값인 경우에 대한 예외 처리 부재
발생 환경 : 스테이징 서버
버그 재현 코드
if (!request.getAccount().isEmpty()) {
user.setAccount(request.getAccount());
}
해결 방안
if (request.getAccount() != null && !request.getAccount().isEmpty()) {
user.setAccount(request.getAccount());
}
In GitLab by @gm2202981 on Jul 19, 2021, 11:47
개요
버그에 대한 설명 추가
버그 내용
버그 재현 코드
해결 방안