netflix-zuul

Using Hystrix Stream in Zuul with Eureka First to find Config server

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-06 20:09:50
问题 I'm using spring cloud Brixton.M4 with spring boot 1.3.1 I have zuul server with <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-netflix-hystrix-stream</artifactId> </dependency> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-stream-rabbit</artifactId> </dependency> and i'm using Eureka first to find Config-Server so bootstrap looks like spring: profiles: dev cloud: config: fail-fast: true discovery: enabled: true

Spring boot Oauth2 : Token relay from a client using Feign, Ribbon, Zull and Eureka to a ressource

百般思念 提交于 2020-01-06 04:46:05
问题 I have an oauth2 client that get a token from an authorization server successfully. (not always has been the case but now it is... :)) The client, the zuul gateway and the resource server are all registered in Eureka. My client use a Proxy to access to a remote ressource service named microservice-files. @RestController @FeignClient(name = "zuul-server") @RibbonClient(name = "microservice-files") public interface ProxyMicroserviceFiles { @GetMapping(value = "microservice-files/root") FileBean

Spring Cloud Zuul proxy Gateway does not load css, js from Spring Boot Application

被刻印的时光 ゝ 提交于 2020-01-06 03:41:28
问题 I have created a gateway application using Spring Cloud Zuul proxy. The gateway application working fine but it is not loading static files like img,css and js files. I have added below setting in my application.properties file of my gateway application zuul.routes.demo.url=http://localhost:8091 where demo is the value of spring.application.name property of my spring boot application. If i run my spring boot application, then all css or js or static files like img loads perfectly fine. But

Spring Cloud Netflix Zuul large file upload

谁说我不能喝 提交于 2020-01-03 06:44:05
问题 I'm using Spring Boot for a project and i'm trying to upload large files but somehow it doesnt work. I have Spring Boot + Zuul (@EnableZuulProxy) running on port 8080 and then another microservice (Lets call it datastore) that should handle the upload. I post a multipart request to http://localhost:8080/zuul/my/upload/endpoint which contains a file and a text string. When I upload a file of 100MB everything works fine. Zuul passes the request to the datastore and the request comes in and is

How to configure Angular 4 behind Proxy?

ぐ巨炮叔叔 提交于 2020-01-02 20:09:11
问题 I'm trying to use angular 4 application behind a proxy server (I'm using zuul as proxy server), since I'm using context path routing, I've configured zuul routes with context path. Below is the zuul routes configuration. kp-app1: path: /kp-app1/** retryable: true serviceId: kp-app1 strip-prefix: false Since Angular runs with baseurl=/ I manually edited index.html and added /kp-app1/ . After much of struggle analyzing packets flow using wireshark, I figured out that though index.html is

Spring cloud Zuul retry when instance is down and forward to other available instance

你。 提交于 2020-01-02 04:01:32
问题 using 'Camden.SR5' for spring-cloud-dependencies, with spring boot '1.5.2.RELEASE'. In my current setup, I have eureka server config server (running on random ports) zuul gateway server and 2 instances of a service (running on random ports) All these instances are successfully register with Eureka. When all the services are running, The load balancing is done properly through zuul without any issues. when an instance is killed, Zuul is still trying to fulfil the request using the same service

Spring Cloud Zuul API gateway doesn't forward JWT token for stateless sessions

懵懂的女人 提交于 2020-01-01 12:10:30
问题 I am trying to implement Microservices architecture backend using Spring Boot 1.5.6.RELEASE and Spring Cloud Dalston.SR3 that would be consumed by mobile/web endpoints. API Gateway application @SpringBootApplicatio @EnableEurekaClient @EnableZuulProxy public class GatewayApplication { public static void main(String[] args) { SpringApplication.run(GatewayApplication.class, args); } } API security @Configuration @EnableWebSecurity @Order(ManagementServerProperties.ACCESS_OVERRIDE_ORDER)

HandlerInterceptorAdapter and Zuul Filter

走远了吗. 提交于 2020-01-01 07:03:13
问题 It is possible add a HandlerInterceptorAdapter with Zuul Configuration. I need to intercept a request to a specific resource but I suppose because I have Zuul filter configuration, the interceptor is never called. Is possible to do so? 回答1: I have tried to achieve the same. We have a few Spring MVC controllers and Zuul proxying. But I still wanted the same Interceptor to be used. The problem here is that zuul runs in its own ZuulServlet, and does not pick up the interceptors from your MVC

Why is ZUUL forcing a SEMAPHORE isolation to execute its Hystrix commands?

无人久伴 提交于 2019-12-30 01:21:04
问题 I noticed Spring-Cloud ZUUL forces the execution isolation to SEMAPHORE instead of the THREAD defaults (as recommended by Netflix). A comment in org.springframework.cloud.netflix.zuul.filters.route.RibbonCommand says: we want to default to semaphore-isolation since this wraps 2 others commands that are already thread isolated But still I don't get it :-( What are those two other commands? Configured this way, Zuul can only sched load but does not allow for timing out and let the client walk

Spring OAuth2RestTemplate can't obtain new accessToken

99封情书 提交于 2019-12-25 11:27:15
问题 I am using spring-boot-oauth2 with authorization_code flow and @EnableZuulProxy .I followed the example from tut-spring-security-and-angular-js with oauth2. I set 60 seconds to access_token_validty for development purpose. Everythings work fine until access token is still valid. But when access token was expired (I waited a moment to expire it), I got exception as below.. WARN SendErrorFilter:78 Error during filtering com.netflix.zuul.exception.ZuulException: Filter threw Exception at com