Код: Выделить всё
org.springframework.web.client.ResourceAccessException: I/O error on PATCH request for "http://localhost:8080/people/1":Invalid HTTP method: PATCH; nested exception is java.net.ProtocolException: Invalid HTTP method: PATCH
Код: Выделить всё
@Configuration
class TestRestTemplateConfig {
@Bean
fun testRestTemplate(restTemplateBuilder: RestTemplateBuilder): TestRestTemplate {
val testRestTemplate = TestRestTemplate(restTemplateBuilder, null, null, null)
testRestTemplate.restTemplate.requestFactory = HttpComponentsClientHttpRequestFactory()
return testRestTemplate
}
}
Код: Выделить всё
implementation("org.apache.httpcomponents:httpclient:4.5.14")
Код: Выделить всё
Caused by: java.lang.ClassNotFoundException: org.apache.hc.client5.http.classic.HttpClient

Я пытался выполнить команду gradle clean, но безуспешно. Я в замешательстве.
Подробнее здесь: https://stackoverflow.com/questions/767 ... tp-classic
Мобильная версия