關於使用GATEWAY后靜態資源失效問題
參考:https://www.freesion.com/article/5956453278/
第一種方式:你直接將靜態文件都放到gateway的工程目錄下
第二種方式(推薦):配置文件方式
貼出主要配置:/static/**表示對靜態資源的路由
routes:
- id: home-service
uri: lb://home-service #lb表示從注冊中心找到服務
predicates: #路由規則
- Path=/home-service/**, /static/**
- id: user-service
uri: lb://user-service
predicates:
- Path=/user-service/**, /static/**