Spring Colud Docker Issues (Connection Refused)

I’m making an example with Spring Cloud.
I have problem on Docker side.
When I run docker-compose,

  1. Keycloak,rabbitmq,mysql and config server are running.

  2. Here is my error in Eureka Server

Connect Timeout Exception on Url - http://configserver:9191/. Will be trying the next u
rl if available
2022-08-17 11:39:08.699  WARN 1 --- [           main] o.s.c.c.c.ConfigServerConfigDataLoader   : Could not locate PropertySource ([ConfigServerConfigDataResource@17fc391b uris = array<
String>['http://configserver:9191/'], optional = true, profiles = list['default']]): I/O error on GET request for "http://configserver:9191/discovery-server/default": Connection refuse
d (Connection refused); nested exception is java.net.ConnectException: Connection refused (Connection refused)

3 ) Here is my error in API Gateway

DiscoveryClient_API-GATEWAY/b522a17da5b3:api-gateway:8600: registering service...
2022-08-17 11:40:25.122  INFO 1 --- [nfoReplicator-0] c.n.d.s.t.d.RedirectingEurekaHttpClient  : Request execution error. endpoint=DefaultEndpoint{ serviceUrl='http://localhost:8761/eu
reka/}, exception=I/O error on POST request for "http://localhost:8761/eureka/apps/API-GATEWAY": Connect to localhost:8761 [localhost/] failed:

4 ) Here is my error in Management Service

Request execution failed with message: I/O error on PUT request for "http://eurekaserve
r:8761/eureka/apps/MANAGEMENT-SERVICE/2c9b83d65d89:management-service:9002": Connect to eurekaserver:8761 [eurekaserver/] failed: Connection refused (Connection refused); nes
ted exception is org.apache.http.conn.HttpHostConnectException: Connect to eurekaserver:8761 [eurekaserver/] failed: Connection refused
  1. Here is my errors in User Service, Advertisement Service and Report Service
java.lang.ClassCastException: class org.hibernate.dialect.MySQL8Dialect cannot be cast to class java.sql.Driver (org.hibernate.dialect.MySQL8Dialect is in unnamed module of loader org.
springframework.boot.loader.LaunchedURLClassLoader @2096442d; java.sql.Driver is in module java.sql of loader 'platform')

Here is the project link : Link