russellchang54 / saas-ui

API网关(中控)
0 stars 1 forks source link

参考 #3

Open russellchang54 opened 7 years ago

russellchang54 commented 7 years ago

Spring Cloud实战小贴士:Zuul处理Cookie和重定向 http://zhuanlan.51cto.com/art/201705/538644.htm

zuul 调优 http://tietang.wang/2016/11/17/hystrix/zuu参数l优化和配置

russellchang54 commented 7 years ago

spring-boot使用StandardServletMultipartResolver 处理 multipart。如果要让StandardServletMultipartResolver 处理PUT请求,重写 isMultiPart 方法即可 @Bean public MultipartResolver multipartResolver() { return new StandardServletMultipartResolver() { @Override public boolean isMultipart(HttpServletRequest request) { String method = request.getMethod().toLowerCase(); if (!Arrays.asList("put", "post").contains(method)) { return false; } String contentType = request.getContentType(); return (contentType != null &&contentType.toLowerCase().startsWith("multipart/")); } }; }

russellchang54 commented 7 years ago

http://blog.didispace.com/springcloud5/

russellchang54 commented 7 years ago

url-routes don’t get executed as a HystrixCommand nor can you loadbalance multiple URLs with Ribbon 如: zuul.routes.users.path: /myusers/** zuul.routes.users.url: http://example.com/users_service 如此,既不能像HystrixCommand(服务熔断/回退)那样执行 ,也不能负载均衡

russellchang54 commented 7 years ago

处理context-path https://www.bountysource.com/issues/35595511-handle-c image

image

关于路由顺序,使用yaml image

russellchang54 commented 7 years ago

为单个路由提供熔断性回退 image

image image

为所有路由提供熔断性回退 image

russellchang54 commented 7 years ago

rewrite Location image

Sidecar 参考文档 http://cloud.spring.io/spring-cloud-netflix/spring-cloud-netflix.html#spring-cloud-ribbon-without-eureka