728x90
반응형
어느날 개발중에 다소 생소한 에러를 하나 마주쳤습니다.
위와 같은 에러였는데요
org.apache.ibatis.reflection.ReflectionException: Illegal overloaded getter method with ambiguous type for property 'password' in class '클래스명'. This breaks the JavaBeans specification and can cause unpredictable results.
대충 이런 내용의 에러였는데요
검색을 해보니 비슷한 오류를 겪으신 분들이 생각보다 많았습니다.
대략적으로 설명을 하자면 lombok 을 사용해서 모델객체를 만들 때
저의 경우
패스워드를 사용할지 여부를 저장하는 boolean 타입의 isPassword 와
패스워드를 저장하는 string 타입의 password
이렇게 두개의 변수를 선언하였는데
lombok 에서 두개의 변수명에 동시에 password 라는 단어가 들어가서
getter setter 생성 시 두개를 동일한 변수라고 인식하여 생기는 오류였습니다.
이런 오류 발생 시 is 뒤에 오는 변수명이 중복되지 않게 설정해주면
오류가 해결됩니다.
728x90
반응형
'개발 > error debuging' 카테고리의 다른 글
vuejs 에서 데이터에 html 태그를 text 로 쓰고 싶을 때 (0) | 2022.10.25 |
---|---|
Datepicker 사용시 TypeError: Cannot set property 'currentDay' of undefined (1) | 2020.12.14 |
Failed to execute 'appendChild' on 'Node' 에러 해결 (0) | 2020.11.12 |
form 안에 button 이 있을때 자동으로 submit 되는 현상 막기 (0) | 2020.09.26 |
자바스크립트 제이쿼리 $(window).focus() 가 안될 때 (0) | 2020.09.26 |