George
07/17/2022, 12:34 PMfinishConnect(..) failed: Connection refused: /[0:0:0:0:0:0:0:1]:80; nested exception is io.netty.channel.AbstractChannel$AnnotatedConnectException: finishConnect(..) failed: Connection refused: /[0:0:0:0:0:0:0:1]:80
org.springframework.web.reactive.function.client.WebClientRequestException: finishConnect(..) failed: Connection refused: /[0:0:0:0:0:0:0:1]:80; nested exception is io.netty.channel.AbstractChannel$AnnotatedConnectException: finishConnect(..) failed: Connection refused: /[0:0:0:0:0:0:0:1]:80
from a rather simple springboot-kotlin code. Has anyone encountered this? Thanks in advance 🙂@SpringBootApplication
class SpringVarPathIssueApplication
fun main(args: Array<String>) {
runApplication<SpringVarPathIssueApplication>(*args)
}
@RestController
class SimpleRestReactiveController {
@GetMapping("/get")
suspend fun getMapping(): String {
return "todo"
}
}
Test:
@SpringBootTest
class SpringVarPathIssueApplicationTests {
private val webClient = WebClient.builder().build()
@Test
fun testSimpleController(): Unit = runBlocking {
val response = webClient
.get()
.uri("/get")
.retrieve()
.awaitBody<String>()
println("response: $response")
}
}
Chris Lee
07/17/2022, 2:51 PMGeorge
07/17/2022, 4:25 PMuri("localhost:8080/api")
?