22:33 WARN o.s.w.s.m.m.a.ExceptionHandlerExceptionResolver - Failure in @ExceptionHandler public org.springframework.http.ResponseEntity kr.p.eye.platform.member.MemberExceptionHandler.handleMemberException(kr.p.eye.platform.member.MemberException) org.springframework.http.converter.HttpMessageConversionException: Type definition error: [simple type, class kr.p.eye.platform.common.error.Error]; ..
public int thubmsUpComment(int commentId, int memberNo) { Map params = new HashMap(); params.put("commentId", commentId); params.put("memberNo", memberNo); System.out.println(params); return insertAction.executeAndReturnKey(params).intValue(); } 오류 : comment_id 는 null이 될 수 없다 = commentId를 파라미터로 찾지 못한다 수정: 객체로 넣어준다 public int thubmsUpComment(int commentId, int memberNo) { CommentUp commentUp = ne..
항상 inner join만 해도 문제가 없었음. 왜냐하면 양쪽에 데이터가 있는 경우만 다뤘기 때문 SELECT V.*, count(c.id) AS comment_count FROM ( SELECT e.product_id, e.id AS episode_id, @rownum :=@rownum+1 AS episode_no, p.title, e.create_date FROM episode_info e INNER JOIN product p ON p.id = e.product_id , (SELECT @rownum := 0) r WHERE e.product_id = :productId ) V INNER JOIN episode_comment c ON v.episode_id = c.episode_id WHERE epis..
원래 되는 쿼리 SET @rownum := 0; SELECT e.product_id, e.id AS episode_id, @rownum := @rownum +1 AS episode_no, e.episode_name, e.star_score, e.create_date FROM episode_info e INNER JOIN product p ON p.id = e.product_id WHERE e.product_id = :productId ORDER BY episode_no DESC BUT jdbcTemplate은 .query에 한문장이라 오류남 수정 SELECT e.product_id, e.id AS episode_id, @rownum := @rownum +1 AS episode_no, e.episode_n..
@ComponentScan ((basePackages = {"WebMvcContextConfiguration이 들어가있는 패키지"}) 를 실행하면 Error creating bean with name 'resourceHandlerMapping' defined in class path resource [org/springframework/web/servlet/config/annotation/DelegatingWebMvcConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate..