bygui86 / admin-consul-gateway

Sample project using Consul and Spring Cloud Gateway

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sample project using Consul and Spring Cloud Gateway

Sub-projects


Run

  1. Start Consul

    docker run -d --name consul -e CONSUL_BIND_INTERFACE=eth0 -p 8300-8302:8300-8302 -p 8600:8600 -p 8500:8500 --network bridge --add-host=dockerhost:$(ifconfig en0 | grep inet | grep -v inet6 | awk '{print $2}') consul
    
  2. Create common configurations in Consul

    echo -n 'common-property-value' | http PUT localhost:8500/v1/kv/config/address-service/common/property
    echo -n 'common-property-value' | http PUT localhost:8500/v1/kv/config/person-service/common/property
    echo -n 'common-property-value' | http PUT localhost:8500/v1/kv/config/api-gateway-service/common/property
    
  3. Start Gateway

    cd ./spring-cloud-gateway
    mvnw clean spring-boot:run
    
  4. Start Person service

    cd ./person-service
    mvnw clean spring-boot:run
    
  5. Start Address service

    cd ./address-service
    mvnw clean spring-boot:run
    

Links

Turbine (Not supported by Consul, just Eureka for now)

About

Sample project using Consul and Spring Cloud Gateway

License:Apache License 2.0


Languages

Language:Java 100.0%