datdatyul
Active Coder
Spring Cloud Docker - Cannot access any service through api gateway and Cannot access any service itself
I have a problem about accessing any service through api gateway.
Here is the properties file of api-gateway
```
For instance, I tried to access user service through api gateway, I defined the url shown below.
```
It didn't work (I only saw Could not send request).
I also defined some urls shown below for this purpose but all these cannot work.
```
I used these urls shown below but nothing changed. I still got the same error.
How can I fix it ?
Here is my project link : Link
I have a problem about accessing any service through api gateway.
Here is the properties file of api-gateway
```
```eureka.client.serviceUrl.defaultZone=http://eurekaserver:8761/eureka/
spring.application.name=api-gateway
server.port=8600
## User Service Route
spring.cloud.gateway.routes[0].id=user-service
spring.cloud.gateway.routes[0].uri=lb://user-service
spring.cloud.gateway.routes[0].predicates[0]=Path=/userservice-api/**
## Advertisement Service Route
spring.cloud.gateway.routes[1].id=advertisement-service
spring.cloud.gateway.routes[1].uri=lb://advertisement-service
spring.cloud.gateway.routes[1].predicates[0]=Path=/advertisementservice-api/**
## Management Service Route
spring.cloud.gateway.routes[2].id=management-service
spring.cloud.gateway.routes[2].uri=lb://management-service
spring.cloud.gateway.routes[2].predicates[0]=Path=/managementservice-api/**
## Report Service Route
spring.cloud.gateway.routes[3].id=report-service
spring.cloud.gateway.routes[3].uri=lb://report-service
spring.cloud.gateway.routes[3].predicates[0]=Path=/reportservice-api/**
For instance, I tried to access user service through api gateway, I defined the url shown below.
```
```
It didn't work (I only saw Could not send request).
I also defined some urls shown below for this purpose but all these cannot work.
```
```
I used these urls shown below but nothing changed. I still got the same error.
How can I fix it ?
Here is my project link : Link