spring-cloud

Can not fetch values from remote spring config from spring boot client in Kubernetes

两盒软妹~` 提交于 2019-12-23 05:27:25
问题 Here's my bootstrap.yml of my client spring: cloud: config: enabled: true uri: http://localhost:8888 label: master spring.application: name: microservices-client spring.profiles: active: dev Here's my spring config server bootstrap.yml spring: application: name: microservices-client profiles: active: dev cloud: config: uri: http://localhost:8888 And here's my spring config application.yml server: port: 8888 spring: cloud: config: server: git: uri: ssh://git@riscm.company.com/sem/some_repo.git

Unable to call the /encrypt endpoint with Spring Cloud + boot in v2.0.X

冷暖自知 提交于 2019-12-23 05:22:35
问题 I was using the Spring Cloud and Security example. In this example, I was using Spring Boot version 1.4.1.RELEASE . Spring Boot parent version to 2.0.4.RELASE . The moment I updated the dependency following endpoint started breaking. I already went through Spring Cloud Config - Encrypt Password and documentation http://cloud.spring.io/spring-cloud-static/Finchley.RELEASE/single/spring-cloud.html, but not sure why I am getting forbiddeb error. I tried using CURL and POSTMAN, get the forbidden

Deny access to one particular subpath for spring cloud gateway route

北慕城南 提交于 2019-12-23 05:01:24
问题 We're using Spring Cloud Gateway in front of our backend services. We have a route similar to the following: routes: - id: foobar-service uri: lb://foobar-service predicates: - Path=/foobar/** filters: - StripPrefix=1 We want to deny access to one particular subpath (e.g. /foobar/baz/** ) but leave the rest open. Is it possible to do this using the YAML syntax? Perhaps we need to implement the routes using the Fluent API instead? 回答1: routes: - id: foobar-baz-service uri: no://op predicates:

Error creating bean with name 'eurekaInstanceConfigBean': Singleton bean creation not allowed while singletons of this factory are in destruction

这一生的挚爱 提交于 2019-12-23 04:55:22
问题 This question is extension of Working With Eureka Clients Programmatically issue - Completed shut down of DiscoveryClient. On my windows machine JAVA_HOME and PATH both versions where different. I just corrected it and now its showing me below error. Error: Invocation of destroy method failed on bean with name 'scopedTarget.eurekaClient': org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'eurekaInstanceConfigBean': Singleton bean creation not

App properties in Spring Cloud Data Flow application

与世无争的帅哥 提交于 2019-12-23 04:24:06
问题 Based on the documentation for Spring Cloud Data Flow (SCDF) only properties that are prefixed by either "deployed." or "app." are considered when deploying an application (be it a source, processor or sink) as part of a stream. However, I've noticed that besides the prefix, all the properties must be provided as "strings", no matter what their original type is; otherwise, they are simply discarded by SCDF as per this line of code: propertiesToUse = DeploymentPropertiesUtils.convert(props);

Spring Cloud Contract and plain Spring AMQP

孤者浪人 提交于 2019-12-23 03:38:12
问题 We are using plain Spring AMQP in our spring boot projects. We want to make sure that our message consumers can test against real messages and avoid to test against static test messages. Thus our producers could generate message snippets in a test phase that can be picked up by the consumer test to make sure it tests against the latest message version and see if changes in the producer break the consumer. It seems like Spring Cloud Contract does exactly that. So is there a way to integrate

spring cloud config versioning

风流意气都作罢 提交于 2019-12-23 03:10:24
问题 I have all the common properties in application.properties file. version specific properties are in version1 and version2 folders in github. order-service(base folder) application.properties version1 app-dev.properties version2 app-dev.properties How can I set the config in application.yml file to ensure cloud config server returns version 1 props along with with common props when version1 url is hit.Below is the config that I have now to fetch props from base folder and how could it be

springboot所有pom依赖

三世轮回 提交于 2019-12-23 03:01:48
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.1.1.RELEASE</version> <relativePath/> <!-- lookup parent from repository --> </parent> <groupId>com.example</groupId> <artifactId>demo</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>jar<

Spring Cloud - hystrix-dashboard is not working?

天大地大妈咪最大 提交于 2019-12-22 17:52:09
问题 Spring Cloud Hystrix Circuit Breaker Pattern Example. I have added below dependency in the code taking https://howtodoinjava.com/spring/spring-cloud/spring-hystrix-circuit-breaker-tutorial/ Spring Boot Starter parent version is 1.5.13.BUILD-SNAPSHOT <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-netflix-hystrix</artifactId> </dependency> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-netflix-hystrix

Microservices - RestTemplate UnknownHostException

折月煮酒 提交于 2019-12-22 08:23:02
问题 I have a simple setup with a Eureka service registration server, a service for the public API and a service that gets called from the public API using RestTemplate. Eureka tells me that the services are successfully registered, but when I call the service @Service public class MyServiceService { @Autowired private RestTemplate restTemplate; private final String serviceUrl; public MyServiceService() { this.serviceUrl = "http://MY-SERVICE"; } public Map<String, String> getTest() { Map<String,