코딩 에러 및 질문

코딩 에러 및 질문

"ERROR" dispatch for POST "/error", parameters={masked}

🌳 에러 코드 2023-05-25 21:28:21,827 DEBUG [org.springframework.web.servlet.DispatcherServlet] Completed 400 BAD_REQUEST 2023-05-25 21:28:21,828 DEBUG [org.springframework.web.servlet.DispatcherServlet] "ERROR" dispatch for POST "/error", parameters={masked} 2023-05-25 21:28:21,828 DEBUG [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping] Mapped to org.springframework..

코딩 에러 및 질문

리뷰글이 많은 순서대로 조회하기

🌳 에러 코드 리뷰글이 많은 순서대로 조회하는 중, 해당 유저마다 총 글 개수가 나왔지만, 유저아이디 만큼 계속 나오는 현상. 🌳 해결 방법 🌾 원인 : xml에서 조건을 걸지 않고 모든 글을 다 조회하려고 했기 때문에, 모든 글이 select로 뿌려짐. 🌾 해결 방법 : xml에서 userId만큼 개수를 조회하고 group by 묶어서 조건을 순서대로 정렬하기. Before - ReviewBO - ReveiwXML After - reviewBO - ReviewXML

코딩 에러 및 질문

org.apache.ibatis.binding.BindingException

🌳 에러 코드 There was an unexpected error (type=Internal Server Error, status=500). Mapper method 'com.language.review.dao.ReviewMapper.selectReviewCountByReviewIdUserId' attempted to return null from a method with a primitive return type (int). org.apache.ibatis.binding.BindingException: Mapper method 'com.language.review.dao.ReviewMapper.selectReviewCountByReviewIdUserId' attempted to return null ..

코딩 에러 및 질문

javax.el.PropertyNotFoundException

🌳 에러 코드 Tue May 23 15:41:52 KST 2023 There was an unexpected error (type=Internal Server Error, status=500). Property [reviewCatgoryId] not found on type [com.language.review.model.Review] javax.el.PropertyNotFoundException: Property [reviewCatgoryId] not found on type [com.language.review.model.Review] 🌳 해결 방법 🌾 원인 : ${reviewLists.reviewCatgoryId} 스펠링 오류. 🌾 해결 방법 : ${reviewLists.reviewCategoryI..

코딩 에러 및 질문

여러 댓글 중, 첫번째 댓글만 보여지는 현상.

🌳 에러 코드 ... 더보기 클릭 시 첫번째 댓글 내용만 보여지는 현상. 🌳 해결 방법 🌾 원인 : 여러 댓글에서 하나의 댓글을 select 할 때 id 가져오는 문제 발생. 🌾 해결 방법 : data- 를 이용해서 (data-comment-id ) 하나의 댓글 id 가져오기. After

코딩 에러 및 질문

org.springframework.web.bind.MissingServletRequestParameterException:

🌳 에러 코드 There was an unexpected error (type=Bad Request, status=400). Required request parameter 'commentId' for method parameter type Integer is not present org.springframework.web.bind.MissingServletRequestParameterException: Required request parameter 'commentId' for method parameter type Integer is not present 🌳 해결 방법 🌾 원인 : @RequestParam - commentId를 비필수 설정을 하지 않았다. 🌾 해결 방법 : commentId가 처음에..

코딩 에러 및 질문

에러 - 빈 댓글 생성

🌳 에러 코드 빈 댓글 시, 아무 것도 쓰여 있지 않은 빈 댓글 표시 박스 생성 필요. 🌳 해결 방법 🌾 원인 : 빈 댓글 칸은 JSP에서 grammar객체에서 가져오면 안되고, comment객체를 가져와야 했다. 🌾 해결 방법 : Controller에 comment객체 model를 만들어 JSP에 뿌린다. Before After - GrammarController - JSP

코딩 에러 및 질문

'좋아요' 클릭시 빈 하트, 채워진 하트 무 변화.

🌳 에러 코드 🌳 해결 방법 🌾 원인 : JSP에서 좋아요 기능을 grammarView에서 온 객체로 사용하고 있었다. 하지만 '좋아요' generateGrammarList 메소드에는 userId 파라미터가 필요했으나, controller에서는 userId를 넘기지 않았다. 그래서 하트에 변화가 없었다. 🌾 해결 방법 : JSP에서 좋아요 기능이 어떤 변수를 사용하고 있는지 파악 후, 파라미터를 내려가면서 확인한 결과, 좋아요 기능을 위해서는 userId를 넘기는게 필요하다는 결과가 나왔고, Controller에서부터 userId를 BO에 넘이고 BO에서 받게 했다. Before - JSP - GrammarController - GrammarBO After - GrammarController - Gram..

코딩 에러 및 질문

가공 메서드 파라미터 오류

🌳 에러 코드 가공 메서드에서 만드는 중, 파라미터 오류로 인해 원하는 리스트가 안 뿌려지고, 모든 리스트가 뿌려지는 현상. 🌳 해결 방법 🌾 원인 : 가공 메서드를 만드던 중, 그래머 글, 그래머 댓글, 글쓴이 정보 등 메서드를 하나로 합치는 과정에서 댓글의 파라미터 오류로 인해 모든 리스트가 뿌려지는 현상. 🌾 해결 방법 한 페이지에 여러글이 아닌, 하나의 글만 나오는 페이지이기 때문에, 가공 메소드 안에 grammarId가 이미 파라미터로 들어와 있었습니다. 그렇기 때문에 반복문 안에서 쓰이는 파라미터는 grammar.getId()가 아닌 메소드를 통해 들어온 grammarId로 수정해 원하는 댓글만 나오게 했습니다. Before After

코딩 에러 및 질문

javax.servlet.jsp.JspTagException:

🌳 에러 코드 Fri May 19 14:05:57 KST 2023 There was an unexpected error (type=Internal Server Error, status=500). Illegal use of -style tag without as its direct parent javax.servlet.jsp.JspTagException: Illegal use of -style tag without as its direct parent 🌳 해결 방법 🌾 원인 : 쓰지 않고 부터 시작해서 에러. 🌾 해결 방법 : 태그를 먼저 쓰고 쓰기.

요가하는 개발자
'코딩 에러 및 질문' 카테고리의 글 목록 (6 Page)