본문 바로가기
Error

Error creating bean with name 'swaggerConfig' defined in file

by YoonJong 2022. 11. 21.
728x90

에러내용

Error creating bean with name 'swaggerConfig' defined in file [C:\Users\dbswh\IdeaProjects\프로젝트\shop\out\production\classes\com\project\shop\global\config\SwaggerConfig.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.fasterxml.classmate.TypeResolver' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}

 

에러원인

springMVC 에서 swagger 를 사용하기 위해서는 아래와 같이 어노테이션을 추가해주어야 한다.

아래와 같이 컨트롤러 테스트에서만 에러가 발생하는 것을 확인할 수 있다.

 

에러조치

https://stackoverflow.com/questions/41718459/spring-boot-swagger-2-configuration-error-creating-bean-with-name-documentation

 

추가해주었더니 정상작동 되었다.

728x90

댓글