Method threw 'org.springframework.beans.factory.BeanCreationException' exception.
bean이 제대로 등록되지 않았다고 해서 detailMassage 보니까
Error creating bean with name 'handlerExceptionResolver' defined in class path resource [org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]: Bean instantiation via factory method failed
내가 등록한 bean이 아니라 WebMvcAutoConfiguration.class 에서 bean 등록에 자꾸 실패한다.
그래서 test application 실행하는 클래스 위에 WebMvcAutoConfiguration.class 를 제외하도록 설정
@Configuration
@SpringBootApplication
@EnableAutoConfiguration(exclude = {WebMvcAutoConfiguration.class})
public class TestApplication {
...
}
출처:
댓글