spring-cloud

Zuul Routing on Root Path

有些话、适合烂在心里 提交于 2019-12-08 07:18:55
问题 I want to config zuul to route request to root / to a home page. I tried: root: path: / url: http://hostname/home/index.jsp and root: path: /** url: http://hostname/home/index.jsp But neither of them works. I just got a 404 NOT FOUND. I think the path match config should be similar to those with contexts, such as /service/** , but it's not. 回答1: This is what I have done to make this work. Within Zuul -> controller: @RequestMapping(value = "/", method = RequestMethod.GET) public String

spring cloud config pattern match for profile

淺唱寂寞╮ 提交于 2019-12-08 07:06:57
问题 I am trying to implement the pattern matching feature of spring cloud config based on the different profiles for an application. Based on the documentation in http://cloud.spring.io/spring-cloud-config/spring-cloud-config.html#_environment_repository it is possible to match the repositories based on profiles. Below is my config server application.yml server: port: 8888 spring: cloud: config: server: git: uri: ssh://xxxx@github/sample/cloud-config-properties.git repos: development: pattern: -*

Spring Cloud Gateway - Refreshing routes

坚强是说给别人听的谎言 提交于 2019-12-08 06:09:07
问题 Using spring-cloud-gateway 2.0.0.M5, Im defining routes in configuration file (application.yml). I'm trying to update these routes by calling POST /application/gateway/refresh. Modified routes, or new routes, are not refreshed, even though I see (with a breakpoint) that a refresh routine is actually executed. Is the refresh supposed to work when routes are defined in configuration files ? Something I am missing ? The use case would be routes defined in spring config server. 回答1: For those

Spurious failures on discovery client connecting to discovery server

随声附和 提交于 2019-12-08 05:16:01
问题 We are noticing a number of random failures on the spring cloud services that we created trying to connect to the discovery server. They seem to happen every now and then and so far have not caused discovery to fail. However, out operations group is reporting this to us a possible issue and we are trying to investigate. Is there any condition that we should be concerned about. The example that I am showing below is that i replicated the same issue running on my laptop with the service and

Spring Cloud Zuul Monitor/CircuitBreaker All Routes via Hystrix

[亡魂溺海] 提交于 2019-12-08 05:12:57
问题 I am using Spring Cloud and @EnableZuulProxy Is it possible to monitor all routes configured in application.yml using hystrix via /hystrix.stream? In the example below I would like to have a simple way to monitor all request made to the down stream product service. I understand that I can do this on the product service itself, but is it possible to monitor Zuul request. This would be useful for any down stream services that are not owned (third party) and cannot be annotated with the

ZuulException (SendErrorFilter) at first call

安稳与你 提交于 2019-12-08 05:02:59
问题 I am building an application by Spring Cloud ,Spring Boot and Docker. Entire application is working fine. I have couple of micro-services. Each of the project is running on Docker. When I try to consume my micro-services through Zuul API Gateway I am getting an error for the 1st call. But if I refresh the browser it's working fine. The error is given below-- 2019-03-10 04:54:55.440 WARN [netflix- zuul-api-gateway- server,1855093598d4f99c,1855093598d4f99c true] 1 --- [nio-8765-exec-1] o.s.c.n

Spring Cloud Config - Encrypt Password

我是研究僧i 提交于 2019-12-08 04:07:34
问题 I saw that spring cloud config provides an /encrypt and /decrypt endpoints. How can I use the encrypt and decrypt endpoint via Advanced REST Client in order to view the encrypted or decrypted string? 回答1: As Spring Cloud Config documentation states: The server also exposes /encrypt and /decrypt endpoints (on the assumption that these will be secured and only accessed by authorized agents). If you are editing a remote config file you can use the Config Server to encrypt values by POSTing to

Spring Cloud Zuul Reverse Proxy doesnt fetch data from CouchDB when URL encoded

依然范特西╮ 提交于 2019-12-08 03:30:54
问题 (UPDTED) I created a Spring cloud Reverse proxy using spring-cloud-starter-zuul to forward all pouchDB-CouchDB requests through my proxy. and it forward all requests that are like http://10.16.33.221:8080/couchdb/** . Here is my application.properties file zuul.routes.couchdb.url=http://10.16.32.85:5984/ ribbon.eureka.enabled=false server.port=8080 10.16.32.85:5984 is CouchDB address. The problem occurred when pouchDB - CouchDB sync requests are forwarding. I found some URL-encoded Options

Spring Cloud Config Server Not Refreshing

江枫思渺然 提交于 2019-12-08 02:41:41
问题 I'm setting up a Spring cloud server to read of an internal Stash directory. The server loads up ok the first time, but if I update properties in git, they don't get reflected until I restart cloud server (I try POST to /refresh endpoint). I'm on Windows and I see a few bugs related to server on Windows but I don't see any specific mention of my bug. 回答1: see org.springframework.cloud.bootstrap.config.RefreshEndpoint code here: public synchronized String[] refresh() { Map<String, Object>

Spring Boot, Spring Cloud AWS and AWS SQS not reading from the queue

大城市里の小女人 提交于 2019-12-08 02:27:40
问题 I am trying a to build a minimal gradle java project with Spring Boot and Spring Cloud AWS SQS but I can't get it to read from the queue. These are my project files: build.gradle: apply plugin: "java" apply plugin: "eclipse" apply plugin: "spring-boot" apply plugin: "io.spring.dependency-management" sourceCompatibility = 1.8 targetCompatibility = 1.8 buildscript { repositories { mavenCentral() } dependencies { classpath("org.springframework.boot:spring-boot-gradle-plugin:1.3.5.RELEASE")