개발 여정/Error
-
c:when문이 반영이 안됐던 이유 (result의 키값)개발 여정/Error 2021. 9. 10. 15:06
미션에 가입되어 있으면 탈퇴하기 버튼, 가입 안 되어 있으면 탈퇴하기 버튼만 나오게 하려고 했음. 그런데 jsp의 작동이 안됨. controller에서 logger을 찍어보면 result값은 올바르게 입력되었음. *원인: result는 맵이기 때문에 조건문에서 result의 키를 또 명시해줘야 함. ex) (X) (O) int missionId = id; int member = missionBO.getExistedMember(missionId, userId); // 미션 가입했는지 여부 가져옴 Map result = new HashMap(); if(member > 0) { result.put("result", "member"); } else { result.put("result", "no-member")..
-
[스프링] 500 에러 : TooManyResultsException개발 여정/Error 2021. 9. 7. 17:59
There was an unexpected error (type=Internal Server Error, status=500). nested exception is org.apache.ibatis.exceptions.TooManyResultsException: Expected one result (or null) to be returned by selectOne(), but found: 2 org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.TooManyResultsException: Expected one result (or null) to be returned by selectOne(), ..