에러노트3 Bean property '필드명' is not readable or has an invalid getter method 발생게시판 만들기 프로젝트 진행 도중 컨트롤러에서 View를 호출하는 과정에서 발생하였다.에러로그Bean property 'id' is not readable or has an invalid getter methodid 필드를 읽을 수 없거나, getter 메서드가 잘못되었다고 한다. 필자의 경우는 id 필드를 읽을 수 없는 경우였다.해결PostForm.javaimport jakarta.validation.constraints.NotEmpty;import lombok.Getter;import lombok.Setter;@Getter@Setterpublic class PostForm { private Long id; // 추가 @NotEmpty(message = "제목은 필수입니다.") .. 2025. 1. 28. expected at least 1 bean which qualifies as autowire candidate 발생게시판 만들기 프로젝트 진행 도중 테스트 코드 작성 후 실행 시 해당 오류가 발생하였다.에러 로그expected at least 1 bean which qualifies as autowire candidate현재 내 프로젝트 내부 코드에서 Beans의 생성자를 찾거나 정의하지 못하는 경우 발생한다. 오류 내용을 자세히 살펴보자.expected at least 1 bean which qualifies as autowire candidate : autowired 할 bean이 적어도 1개 필요No qualifying bean found for dependency : 종속에 적합한 bean이 없음결론적으로 Autowired 할 수 있는게 없다는 뜻으로, 로그에서 알려주는 클래스를 확인해보았다.해결PostD.. 2025. 1. 21. UnsatisfiedDependencyException : Unsatisfied dependency expressed through constructor parameter 0 발생게시판 만들기 프로젝트 진행 도중 테스트 코드 작성 후 실행 시 해당 오류가 발생하였다.에러 로그UnsatisfiedDependencyException : Unsatisfied dependency expressed through constructor parameter 0해당 에러는 구글링 결과 '빈 생성시에 필요한 것이 빠졌거나, 잘못되었으니 고쳐라' 라는 에러라고 한다. 로그에서 알려주는 클래스를 확인해보았다.해결@Service@RequiredArgsConstructor@Transactional(readOnly = true)public class PostService { private final MemberRepository memberRepository; private final Po.. 2025. 1. 21. 이전 1 다음