Error Handling

66. [Error Handling] [JAVA] API 어노테이션 미처리 Error

천재단미 2025. 1. 12. 22:34
728x90
반응형

 

 

목차 ▽열기

 
 

 

Error Code

오류 원인

java: constructor UserResponse in class com.example.travel.dto.UserResponse cannot be applied to given types; required: no arguments found: java.lang.Long,java.lang.String reason: actual and formal argument lists differ in length

 

java: 클래스 com.example.travel .dto.UserResponse의 생성자 UserResponse를 지정된 유형에 적용할 수 없습니다;

필수: 인수 없음

발견됨: java.lang.Long, java.lang.String

이유: 실제 인수 목록과 공식 인수 목록의 길이가 다릅니다

 

 

 

 
어노테이션 프로세서 미설정으로 인한 오류 입니다. 아래와 같은 순서로 설정진행하여 주시면됩니다.
com.example.travel .dto.UserResponse 클래스의 어노테이션이 적용되지 않은것을 확인 할수 있습니다. 
 
 

오류 해결 방법

 

intelliJ

 

1. 설정 

 

 

 

2. 빌드,실행,배포

3. 컴파일러

4. 어노테이션 프로세서

5. 어노테이션처리 활성화

 

 
 Default 및 Annotation profile 내의 폴더  ->  프로젝트 클래스 결로에서 프로세서 가져오기 클릭 

 

6. 확인 

 
재구동 하면 오류가 해결됩니다. 
 
 

728x90
반응형
home
}