Quando executo a opção 1 do programa recebo o seguinte erro:
java.net.ConnectException at java.net.http/jdk.internal.net.http.HttpClientImpl.send(HttpClientImpl.java:951) at java.net.http/jdk.internal.net.http.HttpClientFacade.send(HttpClientFacade.java:133) at src.alura.service.AbrigoService.dispararRequisicaoGet(AbrigoService.java:62) at src.alura.service.AbrigoService.listarAbrigo(AbrigoService.java:19) at src.alura.AdopetConsoleApplication.main(AdopetConsoleApplication.java:28) Caused by: java.net.ConnectException at java.net.http/jdk.internal.net.http.common.Utils.toConnectException(Utils.java:1028) at java.net.http/jdk.internal.net.http.PlainHttpConnection.connectAsync(PlainHttpConnection.java:227) at java.net.http/jdk.internal.net.http.PlainHttpConnection.checkRetryConnect(PlainHttpConnection.java:280) at java.net.http/jdk.internal.net.http.PlainHttpConnection.lambda$connectAsync$2(PlainHttpConnection.java:238) at java.base/java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:934) at java.base/java.util.concurrent.CompletableFuture$UniHandle.tryFire(CompletableFuture.java:911) at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510) at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1773) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) at java.base/java.lang.Thread.run(Thread.java:1583) Caused by: java.nio.channels.ClosedChannelException at java.base/sun.nio.ch.SocketChannelImpl.ensureOpen(SocketChannelImpl.java:202) at java.base/sun.nio.ch.SocketChannelImpl.beginConnect(SocketChannelImpl.java:786) at java.base/sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:874) at java.net.http/jdk.internal.net.http.PlainHttpConnection.lambda$connectAsync$1(PlainHttpConnection.java:210) at java.base/java.security.AccessController.doPrivileged(AccessController.java:571) at java.net.http/jdk.internal.net.http.PlainHttpConnection.connectAsync(PlainHttpConnection.java:212) ... 9 more
Já pesquisei mas não consegui resolver o problema.