Notice
Recent Posts
Recent Comments
Link
이야기앱 세상
Name for argument of type [int] not specified, and parameter name information not available via reflection. Ensure that the compiler uses the '-parameters' flag. 오류 해결하기 본문
IT/Spring
Name for argument of type [int] not specified, and parameter name information not available via reflection. Ensure that the compiler uses the '-parameters' flag. 오류 해결하기
storya 2025. 5. 1. 13:55Spring boot를 사용할 때 Name for argument of type [int] not specified, and parameter name information not available via reflection. Ensure that the compiler uses the '-parameters' flag. 와 같은 오류가 발생할 때 해결하기
위 오류는 리플렉션(reflection)을 통해 메소드의 파라미터 이름을 가져오려고 할 때 발행한다. 기본적으로 Java 컴파일러는 바이트코드(.class 파일)에 파라미터 이름을 저장하지 않기 때문에 이 정보가 필요할 때 오류가 난다고 한다. 컴파일 시 -parameters 옵션을 추가하면 해결된다.
이클립스에서 설정하기
적용하고 싶은 프로젝트 우클릭 한 후 Properties 선택
왼쪽 메뉴에서 Java Compiler 를 선택하고 오른쪽 설정 화면에서 "Store information about method parameters (usable via reflection)" 옵션을 체크 (이 옵션이 -parameters 플래그를 활성화함)
반응형
'IT > Spring' 카테고리의 다른 글
spring xml 파일에서 cvc-elt.1.a: Cannot find the declaration of element 'beans'. 오류 발생 (0) | 2024.06.10 |
---|---|
STS4에서 JSP Editor 사용하기 (0) | 2022.10.01 |
Spring boot 의 gradle project를 import 했을 때 오류 해결 방법 (0) | 2022.08.18 |
mybatis mapper xml 파일에서 VO 알리아스 인식 오류 (0) | 2022.08.18 |
web.xml 파일의 web-app에 오류 해결 방법 (0) | 2022.08.18 |
Comments