I am creating a microservice app with Spring cloud gateway and Consul. When I try getting a response from the microservice "example" with its port (3000) I get the response. But When I try to access with the gateway (demo) port (9090) I got the Whitelabel Error Page 404 error. Please help, thank you.
application.yml
server:
port: 9090
spring:
cloud:
gateway:
routes:
- id: example
uri: lb://example
predicates:
- Path= /**
loadbalancer:
ribbon:
enabled: true
consul:
host: 127.0.0.1
port: 8500
discovery:
health-check-interval: 2s
health-check-timeout: 2s
tags: secure=true
fail-fast: true
instance-id: ${spring.application.name}:${random.value}
jpa:
database: mysql
hibernate:
ddl-auto: update
datasource:
url: jdbc:mysql://localhost:3306/gatewaypfe?serverTimezone=UTC
username: root
password:
application:
name: demo
main:
allow-bean-definition-overriding: true