로컬에서는 잘 실행 되는데 빌드만 하면 에러.. 기존 httpclient -4.5.2.jar 를 사용중 이었는데 maven 에서 뭐가 맘에 안드는지 의존성을 따로 추가해 줘야 빌드가 된다
java.lang.IllegalStateException: Failed to load ApplicationContext for [WebMergedContextConfiguration@2be21396 testClass =
com.raresoft.vc.RaresoftApplicationTests, locations = [], classes = [com.raresoft.vc.RaresoftApplication], contextInitializerClasses = [], activeProfiles = [], propertySourceLocations = [], propertySourceProperties =
["org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true"], contextCustomizers =
[org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@528c868,
org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@31c7528f,
org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0,
org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer@2f16c6b3,
org.springframework.boot.test.autoconfigure.actuate.observability.ObservabilityContextCustomizerFactory
$DisableObservabilityContextCustomizer@1f, org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@
0, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizer@33308786,
org.springframework.boot.test.context.SpringBootTestAnnotation@24e205a7], resourceBasePath = "src/main/webapp", contextLoader =
org.springframework.boot.test.context.SpringBootContextLoader, parent = null] at
org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.
java:143) ~[spring-test-6.0.13.jar:6.0.13] at or
맞는 버전으로 추가하고 빌드하면 된다
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.2</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpmime</artifactId>
<version>4.5.2</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.4.4</version>
</dependency>