1.在application.yml添加如下配置:
zuul:
# 所有請求地址都需要加上如下前綴
prefix: /java1234
# 所有真實映射地址都不能直接訪問
ignored-services: "*"
routes:
# microservice-student爲真實映射的地址
studentServer.serviceId: microservice-student
# /studentServer/**爲請求的地址
studentServer.path: /studentServer/**