java.net.ConnectException: Connection refused between two microservices via docker

I have two microservices. One named "configuration-service" and the other named "sender-service". The first one after REST makes it possible to download the configuration. Locally, using the (Intellij) environment, the services communicate without any problem. The problem comes when I try to download anything via rest from one service to another using Docker.
Moreover after running configuration-service, I can easily retrieve the value data in a browser.

However, when I run the following compose down, I get an error like in the title.
In the rest of the threads, all I found was a suggestion from ‘network’, but it doesn’t work.

To sum up, the communication problem occurs only with the use of a docker, which eliminates the problem with the code.

First dockerfile:

FROM adoptopenjdk/openjdk11:latest
ARG JAR_FILE=target/*.jar
COPY ${JAR_FILE} app.jar
EXPOSE 8888
ENTRYPOINT ["java","-jar","/app.jar"]

second:

FROM adoptopenjdk/openjdk11:latest
ARG JAR_FILE=target/*.jar
COPY ${JAR_FILE} app.jar
EXPOSE 8889
ENTRYPOINT ["java","-jar","/app.jar"]

Docker-compose:

version: '3.1'

services:
    configuration-service:
      image: configuration:latest
      container_name: configuration-service
      ports:
        - "8889:8889"
      restart: always
      networks:
      - common-network

    sender-service:
      image: sender:latest
      container_name: sender-service
      ports:
        - "8888:8888"     
      restart: always
      networks:
      - common-network
      

networks:
  common-network:
  driver: bridge

thanks in advance for any tip

Source: Docker Questions