spring-cloud

Spurious failures on discovery client connecting to discovery server

天涯浪子 提交于 2019-12-06 20:54:33
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 discovery server (eureka) on the same machine, so networking as a cause seems to be not the issue. 015-08

o.s.s.o.provider.endpoint.TokenEndpoint : Handling error: InvalidGrantException, Bad credentials

回眸只為那壹抹淺笑 提交于 2019-12-06 16:58:45
问题 I am developing Spring Cloud authorization server , I am not getting any error when I start the server, but when I tried to access the http://localhost:9000/services/oauth/token, I get the below error. Could you please guide what the issue is ? I wonder why its saying invalid grant though grant_type is correct ? PluralsightSpringcloudM4SecureauthserverApplication @SpringBootApplication @EnableAuthorizationServer @EnableResourceServer @RestController public class

How Spring Cloud Config Server PUSH plain text files to Config Client Application?

旧街凉风 提交于 2019-12-06 15:18:09
What I have implemented so far are: Spring Cloud Config Server with "native" repo. spring.profiles.active: native spring.cloud.config.server.native.searchLocations: file:/path/to/config-repo Config Server is pushing notification to Config Client App through RabbitMQ, as http://cloud.spring.io/spring-cloud-config/spring-cloud-config.html#_push_notifications_and_spring_cloud_bus Config Client App has @RefreshScope annotated on Service bean. So /config-repo has 3 files - application.yaml, client.yaml and client.json All yaml properties changes will be auto reloaded by Config Client App for sure.

Adding environment repository in Spring Config Server

南笙酒味 提交于 2019-12-06 14:50:11
问题 I'm fairly new to Spring Boot so please excuse me if I'm overlooking something simple. With the Spring Config Server, you are able to specify via .yml files what type of environment repository that you would like to use (native, Git, etc). These environment repositories are included in the third-party dependency. I was wondering if it was possible to add your own environment repository so you can, for example, connect to a database to pick up configuration? Many thanks in advance! 回答1: you

搭建SpringCloud微服务

醉酒当歌 提交于 2019-12-06 14:24:18
建立spring父模块 删除不必要的src目录 父模块中的pom.xml中添加相应的依赖以及插件、远程仓库地址 1 <!-- 项目的打包类型, 即项目的发布形式, 默认为 jar. 对于聚合项目的父模块来说, 必须指定为 pom --> 2 <packaging>pom</packaging> 3 4 <name>spring-cloud-home-page</name> 5 <description>Project For VastHomepage SpringCloud</description> 6 7 <parent> 8 <groupId>org.springframework.boot</groupId> 9 <artifactId>spring-boot-starter-parent</artifactId> 10 <version>2.1.4.RELEASE</version> 11 </parent> 12 13 <properties> 14 <spring-cloud.version>Greenwich.RELEASE</spring-cloud.version> 15 </properties> 16 17 <dependencies> 18 <!-- lombok 工具通过在代码编译时期动态的将注解替换为具体的代码, 19 IDEA 需要添加 lombok

Use Spring @RefreshScope, @Conditional annotations to replace bean injection at runtime after a ConfigurationProperties has changed

瘦欲@ 提交于 2019-12-06 13:44:44
问题 I'm running a PoC around replacing bean injection at runtime after a ConfigurationProperties has changed. This is based on spring boot dynamic configuration properties support as well summarised here by Dave Syer from Pivotal. In my application I have a simple interface implemented by two different concrete classes: @Component @RefreshScope @ConditionalOnExpression(value = "'${config.dynamic.context.country}' == 'it'") public class HelloIT implements HelloService { @Override public String

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

我们两清 提交于 2019-12-06 13:01: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") classpath("io.spring.gradle:dependency-management-plugin:0.5.2.RELEASE") } } dependencyManagement { imports

Eureka Renews threshold & Renews (last min)

∥☆過路亽.° 提交于 2019-12-06 12:34:27
问题 I have one Eureka Server A and two client instances of B(Client3) and C(Client4) I got logs from Eureka Server, which are as follows : 2018-01-25 12:56:27.828 INFO 7145 --- [nio-8765-exec-2] c.n.e.registry.AbstractInstanceRegistry : Registered instance CLIENT3/client3:bb488bb73fd313321e393915f746bfe5 with status UP (replication=false) 2018-01-25 12:56:28.417 INFO 7145 --- [nio-8765-exec-3] c.n.e.registry.AbstractInstanceRegistry : Registered instance CLIENT3/client3

How to generate spring cloud feign client using swagger-codegen-maven-plugin

 ̄綄美尐妖づ 提交于 2019-12-06 11:25:38
I want to generate my feign client code using swagger-codegen, but I cannot find the docs which can lead me to do it. I have a microservice using spring cloud, several api-services using spring-cloud-feign interfaces to request the data.I wish that i can generate the feign client code. <plugin> <groupId>io.swagger</groupId> <artifactId>swagger-codegen-maven-plugin</artifactId> <version>2.2.3</version> <executions> <execution> <goals> <goal>generate</goal> </goals> <configuration> <inputSpec>http://localhost:9141/v2/api-docs?group=building-service-api</inputSpec> <language>java</language>

No suitable cloud connector found while trying to use local spring cloud connector/local_configuration_connector

╄→гoц情女王★ 提交于 2019-12-06 11:20:01
问题 I am trying to use the local cloud spring connector to test my application in local environment before it can be deployed to CF based cloud environment. From the Spring link http://cloud.spring.io/spring-cloud-connectors/spring-cloud-connectors.html#_local_configuration_connector I followed the process and created properties file with the name spring-cloud-bootstrap.properties in project resource directory. It has the following content spring.cloud.propertiesFile: C:\Users\IBM_ADMIN\git