Spring (11) 썸네일형 리스트형 @Builder 와 @AllArgsConstructor @NoArgsConstructor 개요 Spring 프로젝트 중 생성자에 값을 넣어주는 문제에 대해 잠시 고민해보았다. 생성자에 넣어주는 값이 예를 들면 title만 넣으려다 title, name, phoneNumber 로 늘어나게 된다면 생성자 수정/추가가 계속 필요하다. 그래서 찾아보던 중 @Builder를 사용해보고자 했다. @Getter public class ColResponseDto { private String title; private int position; private Long boardId; public ColResponseDto(Col columns) { this.title = columns.getTitle(); this.position = columns.getPosition(); this.boardId = col.. [Spring][error]parameter 0 of constructor in Junit 테스트 후 스프링부트 실행 중 다음과 같은 오류가 났다. *************************** APPLICATION FAILED TO START *************************** Description: Parameter 0 of constructor in com.*****UserDetailsServiceImpl required a bean of type 'com.example.hanghaero.repository.UserRepository' that could not be found. Action: Consider defining a bean of type 'com.*******' in your configuration. 빈이 등록되지 않아서 찾을 수 없다는 오류 .. [Junit5테스트 에러] Parameter 0 of constructor in {###} required a bean of type '{###}' that could not be found. Junit5로 테스트를 하는 도중 에러가 났다. 빈으로 등록을 해주지 않아서 생긴 문제였다... @MockBean을 등록해주어야 한다. 삽질 끝 이전 1 2 다음