spring-cloud

Hystrix and Turbine does not work with Spring boot 2 and Spring cloud Finchley.M8

你离开我真会死。 提交于 2019-12-06 10:00:31
问题 I tried turbine + hystrix dashboard with Spring boot 2 and latest versions of Spring cloud, seems exist some problem and turbine could not get stream from reactive service. I just uploaded simple microservices to github https://github.com/armdev/reactive-spring-cloud Exception like this: com.netflix.turbine.monitor.instance.InstanceMonitor$MisconfiguredHostException: [{"timestamp":"2018-03-08T17:22:05.809+0000","status":404,"error":"Not Found","message":"No message available","path":"/hystrix

3.1-1 dependencyManagement中的type为pom用法

别来无恙 提交于 2019-12-06 08:42:47
以第3章示例:spmia-chapter3-master中的子项目confsvr为例说明: 其pom文件内容摘要如下: <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>1.4.4.RELEASE</version> </parent> <dependencyManagement> <dependencies> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-dependencies</artifactId> <version>Camden.SR5</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencyManagement> <dependencies> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-config-server<

Spring Cloud Config port conflict

拜拜、爱过 提交于 2019-12-06 08:34:01
I started playing around with the spring cloud code here: https://github.com/spring-cloud/spring-cloud-config and I tried to run the server and client on the same host. However I keep getting an error (below) which claims that the address is already in use. The server should run on port 8888 by default, so is it not possible for both the client and the server to run on the same host? I'm basically trying to answer this question, but I'm running into this port problem on the way: Spring-Cloud configuration server ignores configuration properties file java.net.BindException: Address already in

Accessing CloudFoundry user-provided services using Spring Cloud connectors

不羁的心 提交于 2019-12-06 06:28:59
问题 I'm trying to use Spring Cloud to consume a generic REST service from a Cloud Foundry app. This service is created using Spring Boot, as follows: package com.something; @RestController public class DemoServiceController { @RequestMapping("/sayHi") public String sayHi() { return "Hello!"; } } This works fine - I can access http://www.example.com/srv/demo/sayHi and get "Hello!" back. Next, I created a user-provided service instance using the CF-CLI and bound it to my app. I can now see the

Is it possible to use Spring API Gateway for threat protection?

扶醉桌前 提交于 2019-12-06 06:18:32
问题 I'm going to implement API Gateway using Netflix Zuul. Is it possible to setup any rules for protection against: SQL Injection, XML Threat Protection JSON Threat Protection I found only external solution (API Gateways) supporting it :( 来源: https://stackoverflow.com/questions/52422198/is-it-possible-to-use-spring-api-gateway-for-threat-protection

How can I adjust load balancing rule by feign in spring cloud

天大地大妈咪最大 提交于 2019-12-06 05:42:00
问题 As I know, feign include ribbon's function, and I prove it in my code. When I use feign, the default rule is Round Robin Rule. But how can I change the rule in my feign client code, is ribbon the only way? Here is my code below, so please help. ConsumerApplication.java @SpringBootApplication @EnableDiscoveryClient @EnableFeignClients @EnableCircuitBreaker public class ConsumerApplication { public static void main(String[] args) { SpringApplication.run(ConsumerApplication.class, args); } }

spring cloud配置中心

你离开我真会死。 提交于 2019-12-06 04:12:27
1.创建一个配置中心,这里我们使用码云上面的(自己创建) 2.导入包 <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-config-server</artifactId> </dependency> 3.添加注解标签,主配置类 package cn.jiedada; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.builder.SpringApplicationBuilder; import org

spring-cloud项目搭建

橙三吉。 提交于 2019-12-06 02:22:14
springCloud项目搭建手册 springcloud应用场景及微服务框架发展趋势 Spring Cloud为开发人员提供了工具,以快速构建分布式系统中的某些常见模式(例如,配置管理,服务发现,断路器,智能路由,微代理,控制总线,一次性令牌,全局锁,领导选举,分布式会话,群集状态)。 分布式系统的协调导致样板式样,并且使用Spring Cloud开发人员可以快速站起来实现这些样板的服务和应用程序。 它们可以在任何分布式环境中正常工作,包括开发人员自己的笔记本电脑,裸机数据中心以及Cloud Foundry等托管平台。 来源: https://www.cnblogs.com/wzj-ocat/p/11956809.html

Spring cloud config server - how to add custom PropertySource visible in findOne() method of EnvironmentEncryptorEnvironmentRepository

ぐ巨炮叔叔 提交于 2019-12-06 00:03:02
My goal is to add custom PropertySource to spring-cloud-server. What I want to achieve is to get some custom properties from that custom source in spring-cloud-config-client application. Basing on suggestions from Adding environment repository in spring-config-server I've created spring-cloud-config-server application and separate project spring-cloud-config-custom . Second one is based on spring-cloud-consul-config code. So, I've created all necessary classes like CustomPropertySource , CustomPropertySourceLocator , CustomConfigBootstrapConfiguration and so on and configured them in spring

loading multiple properties with config-server

浪子不回头ぞ 提交于 2019-12-06 00:02:30
I have successfully tested loading properties from SVN repository, currently in my config server i have provided the URI and default-label: trunk and i have application specific property under trunk . below is the contents of my consuming application's application.yml and able to pull the properties successfully spring: application: name: foo-development cloud: config: uri: http://localhost:${config.port:8888} now i have a shared property in different folder thats shared across other applications as well, so how do i load this into my application along with my application specific You can