springcloud搭建(十四)zuul的路由映射

1.在application.yml添加如下配置:

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

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章