
🌻 JAVA/JUnit
@WebMvcTest 작성 시 의존성 에러
환경 Spring boot 2.7.1 Spring Security JUnit 5 Controller 테스트를 하기위해 불필요한 의존성들은 걷어내고 WebMvcTest 어노테이션을 붙여서 컨트롤러 레이어만 가볍고 빠르게 테스트를 진행할 수 있습니다. WebMvcTest 어노테이션을 붙이게 되면, MVC 테스트를 위한 의존성들이 Spring Contetxt에 올라가게 됩니다. Using this annotation will disable full auto-configuration and instead apply only configuration relevant to MVC tests (i.e. @Controller, @ControllerAdvice, @JsonComponent, Converter/Generi..