📝 ErrorNote 썸네일형 리스트형 [React ] input 컴포넌트 분리하기 중 에러 / Warning: Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()? Check the render method of `ForwardRef(_c)`. Warning: Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()? Check the render method of `ForwardRef(_c)`. 번역하면, 경고: 함수 구성요소에는 참조를 제공할 수 없습니다. 이 참조에 액세스하려는 시도는 실패합니다. React.forwardRef()를 사용하려고 하셨나요? `ForwardRef(_c)`의 렌더링 방법을 확인하세요. 구조를 보면 다음과 같다. 회원가입 폼(JoinForm.jsx)에서 input이 많아 불필요한 렌더링이 계속해서 발생하는 것이 비효율적이라고 .. 더보기 [React.js / javascript] 구조 분해 할당 시 오류 발생 (JS 객체와 배열의 차이) TypeError: object is not iterable (cannot read property Symbol(Symbol.iterator)) at handleRegTest (http://localhost:3000/main.9345674c7ec34bc46fb5.hot-update.js:64:27) 구조분해할당을 시도할 때 발생할 수 있는 에러이다. 이는 구조 분해 할당의 대상이 되는 객체가 실제로 이터러블이 아닌 경우 발생한다. 확인할 점 1. 구조분해할당 대상 확인 : 구조분해 할당을 시도하는 대상이 실제로 이터러블인지 확인 (배열이나 객체를 구조분해 하려고 할때 대상이 올바른지 확인해야함.) 처음에는 이벤트 핸들러를 호출하는 곳이 여러개가 아니라서 그런가? 헷갈렸는데 상당히 기본적인 실.. 더보기 No primary or single unique constructor found for interface java.util.List java.lang.IllegalStateException: No primary or single unique constructor found for interface java.util.List java.util.List 인터페이스에 대한 주요 또는 단일 고유 생성자를 찾을 수 없다는 내용 즉, 컨트롤러에서 리스트 형식으로 받아올 때 적절한 메시지 컨버터로 자바 객체 매핑이 이루어질 수 있도록 @RequestParam 어노테이션을 붙여주자 에러가 해결되었다. 참고로 나는 Get 요청이었기에 @RequestParam 을 붙였으며, Post 요청일 경우에는 각각 적절한 어노테이션을 붙이면 된다. ✅ 참고자료 @RequestBody @ResponseBody 어노테이션 이해하고 사용하기클라이언트와 서버의 통신.. 더보기 [ js/html ] Cannot read properties of undefined (reading 'submit') name 속성이 잘못 되어있었다. 수정하자 정상 작동 식별자를 혼동했다. id : 고유한 식별을 목적으로 하는 경우 사용, 페이지에서 하나의 요소만 지정 가능 class : 재사용을 목적으로 하는 경우 사용, 여러개의 요소에 지정 가능 name : form 컨트롤 요소의 값(value)을 서버로 전송하기 위해 필요한 속성, 여러 개의 요소에 지정 나는 form 데이터를 서버로 전송하기 위해 form 태그의 name 속성을 활용하여 submit 을 해야하는데 name 속성이 잘못되어서 서버로 전송이 되지 않았던 것. 더보기 [ SpringBoot / OAuth2 ] Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory. application.yml 파일 수정으로 해결 에러 내용 2024-03-20 13:27:21.576 WARN 92588 --- [ restartedMain] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'springSecurityFilterChain' defined in class path resource [org/springframework/security/config/annotation/web/configuration.. 더보기 java.lang.ClassCastException java.lang.ClassCastException: class org.jetbrains.jps.builders.java.dependencyView.TypeRepr$PrimitiveType cannot be cast to class org.jetbrains.jps.builders.java.dependencyView. 더보기 [SpringBoot] java.lang.IllegalArgumentException: Modifying queries can only use void or int/Integer as return type! Offending method : @Modifying 리턴타입 확인하기 에러 내용 Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.dao.InvalidDataAccessApiUsageException: Modifying queries can only use void or int/Integer as return type! Offending method: public abstract cohttp://m.cos.photogramstart.domain.comment.Comment cohttp://m.cos.photogramstart.domain.com.. 더보기 [MySQL/MariaDB] ERROR 1241 (21000): Operand should contain 1 column(s) 에러 Operand should contain 1 column(s) 피연산자는 한개의 컬럼만 포함해야한다. 원인 select * from image where id in (select imageId, count(*) likeCount from likes group by imageId order by likeCount desc); 해당 쿼리를 실행하려는데 서브 쿼리가 가져오는 컬럼이 2개여서 에러가 발생했다. 해결 인라인 뷰 사용하기 select imageId from ( select imageId, count(*) likeCount from likes group by imageId order by likeCount desc ) inline_view_table; ✏️ 인라인 뷰란? FROM 절 내부에서 사.. 더보기 이전 1 2 3 다음