spring-cloud-config

RefreshScope Runtime Configuration Without Spring Cloud Config Server

女生的网名这么多〃 提交于 2019-12-31 04:15:09
问题 Is it possible to refresh property(api-url) through POST rest api /refresh call using @RefreshScope without having setup of spring cloud config server and spring cloud config client setup. for.e.g Consumer.java @Service public class Consumer { @value(${api-url}) private String apiUrl; api-url is getting read from application.yml now. I want to change the api-url at runtime without restarting server. Is it possible in spring boot? 回答1: Yes, just include spring cloud starter <parent> <groupId

How do you properly set different Spring profiles in bootstrap file (for Spring Boot to target different Cloud Config Servers)?

本秂侑毒 提交于 2019-12-30 01:55:46
问题 We have different config servers per environment. Each spring boot application should target its corresponding config server. I have tried to achieve this by setting profiles in the bootstrap.properties file, e.g.: spring.application.name=app-name spring.cloud.config.uri=http://default-config-server.com --- spring.profiles=dev spring.cloud.config.uri=http://dev-config-server.com --- spring.profiles=stage spring.cloud.config.uri=http://stage-config-server.com --- spring.profiles=prod spring

Spring cloud config in local dev mode

痴心易碎 提交于 2019-12-25 05:05:35
问题 Is it possible to control if the application requires spring-config-server based on profile. I want to pick properties from resource/... in say local-dev profile and use cloud-config only with a profile where there would be a config-server running. 回答1: You can disable using config-server for a specific profile. Please try to define the properties in bootstrap.yml like below. Please note, we should configure these settings only in bootstrap.yml . Setting these properties in application.yml

Detect and recover from credential deletion in Spring AMQP

孤街浪徒 提交于 2019-12-24 07:33:07
问题 We have a Spring Cloud Config setup, using Vault database backends (MySQL and RabbitMQ), which gives us the ability to inject generated credentials into properties such as: spring.rabbitmq.username spring.rabbitmq.password When our app starts up we have a fresh set of Rabbit credentials, and we have the ability to request a new set on demand. Since our Rabbit credentials are managed externally by Vault, they could be expired / deleted at any time during the app's life (this is also a

Detect and recover from credential deletion in Spring AMQP

被刻印的时光 ゝ 提交于 2019-12-24 07:32:17
问题 We have a Spring Cloud Config setup, using Vault database backends (MySQL and RabbitMQ), which gives us the ability to inject generated credentials into properties such as: spring.rabbitmq.username spring.rabbitmq.password When our app starts up we have a fresh set of Rabbit credentials, and we have the ability to request a new set on demand. Since our Rabbit credentials are managed externally by Vault, they could be expired / deleted at any time during the app's life (this is also a

spring.profiles.include property from spring cloud config

泄露秘密 提交于 2019-12-24 07:18:30
问题 I have a spring boot application. I am using spring.profiles.include in application.yml to add some active profiles according to a given profile, then I am using those active profiles for bean creation as below: application.yml: spring: profiles: prod profiles.include: - enable_tls - enable_mongo_ssl Configuration class - bean creation according active profiles: @Configuration @PropertySource("classpath:/mongo-${mongo.environment}.properties") public class MongoConfiguration { @Bean @Profile(

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

Custom Encryption/Decryption for Spring-Cloud-Config Server

跟風遠走 提交于 2019-12-23 05:19:09
问题 I am using spring-cloud-config server and trying to use the encrypt/decrypt feature. Is there a way we can customize the encrypt/decrypt feature i.e. we do have our own encryption standards and want to leverage those libraries. Appreciate any help in advance. 回答1: If you want to customize the encryption/decryption, essentially you need customize the org.springframework.security.crypto.encrypt.TextEncryptor bean by yourself. Optimisticly, remove all the entrypt related configuration from your

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

Can i have more than one Spring Cloud Config Server?

ε祈祈猫儿з 提交于 2019-12-22 05:34:13
问题 I understand that i can use more than 1 repositories to distribute my configurations across multiple repositories (probably for each application) but, can I run more than 1 Config servers for these repositories , so that we can avoid a single point of failure a the 'Config Server' . If we can run multiple config servers, how do i abstract my client's from accessing any one particular config server ? Update (after further reading): instead of using IP in the URI, if i use a URL which load