Springboot gateway

Posted on July 15, 2017
Tags: java
cd src/main/resources
touch application.yaml

WARN: The name MUST be “application.yaml” or else springboot will not auto-detect it!

server:
  port: 3000

spring:
  application:
    name: gateway
  cloud:
    gateway:
      routes:
        - id: gateway
          uri: http://localhost:4000/
          predicates:
            - Path=/**
          filters:
          - RewritePath=//?(?<segment>.*), /v1.0/invoke/greeting/method/$\{segment}