spring-cloud-config

spring-cloud-starter-config POST /env not working

爱⌒轻易说出口 提交于 2019-12-06 06:28:44
I have a little spring boot web application (executable jar) which has some custom properties inside the application.properties file. My goal is to be able to dynamically alter these properties at runtime without having to run a build/deploy or restarting the java process. The spring-cloud-starter-config project seems to be well suited for this (even though I am not using a config server) but I ran into the following problem: In my pom.xml I include dependencies to spring-boot-starter-actuator and spring-cloud-starter-config. The application.properties configures below properties management

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

USERAUTH fail with private key file for Github and Spring cloud config

我与影子孤独终老i 提交于 2019-12-05 06:09:57
I tried to use the method for using private key (that has passphrase and is added to ssh-agent from file) (according to this stack post): spring: cloud: config: server: git: uri: git@github.com-forApp:myorg/myrepo.git search-paths: '{application}' clone-on-start: true private_key_file: ~/.ssh/id_rsa but I keep getting org.eclipse.jgit.api.errors.TransportException: git@github.com:myorg/myrepo.git: USERAUTH fail Do I have to do it exactly as doc says with pasting the key into config file or can one just point to the key file somehow? EDIT Actually it turns out that the private_key_file is not

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

僤鯓⒐⒋嵵緔 提交于 2019-12-04 16:38:17
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\ServiceXchange5\ServiceXchange\spring-cloud.properties I do have the file spring-cloud.properties in the

Spring Config server add property at runtime

旧城冷巷雨未停 提交于 2019-12-04 14:53:23
I want to add some property at runtime in spring config server and it should be available to all client applications with @Value annotation. I wont have this property predefine because I am going calculate that value in spring config server and add to environment. Can you please help me understand what is best way to achieve this. Stefan Isele - prefabware.com Spring cloud configuration contains a feature named ' RefreshScope ' which allows to refresh properties and beans of a running application. If you read about spring cloud config, it looks like it can only load properties from a git

Spring Cloud Config Server Priority of Environment Variables

淺唱寂寞╮ 提交于 2019-12-04 08:52:00
问题 I have a question regarding the priority of environment variables when working with spring cloud config server In my service I have a local properties file application.yml with this content foo: bar: "some" buz: "some" joe: "some" The service is also connected to a config server with a configuration repository that contains a file testservice-api.yml (where testservice-api is the spring application name of the service). The contents of this file is: foo: bar: "some-specific" So with this

Unable to get logback-spring.xml property file using Spring Cloud Config and Discovery

心已入冬 提交于 2019-12-04 03:46:18
问题 I'm using Discovery first bootstrap feature and Consul as a Discovery Server, url to Config Server is located during start-up and I was able to get application.properties . I need also to get logback-spring.xml configuration from Config server and I don't know how. What should I specify in logging.config={???}logback-spring.xml property to not hardcode url to Config Server? Before Consul integration I was using url formed according to Serving Plain text documentation with hardcoded Config

@RefreshScope and /refresh not working

孤街浪徒 提交于 2019-12-03 16:39:25
I have tried to implement spring external configurations using Config Server. It is working fine for the very first time when the application is started but any changes to the properties file are not being reflected. I tried to use /refresh endpoint to refresh my properties on the fly but it doesn't seem to be working. Any help on this would be greatly helpful. I tried POSTing to localhost:8080/refresh but getting a 404 Error response. Below is the code of my application class @SpringBootApplication public class Config1Application { public static void main(String[] args) { SpringApplication

spring config server encrypt forbidden

半世苍凉 提交于 2019-12-03 16:15:33
I've configured a spring cloud config server to use oAuth2 for security. Everything is working well, except the encrypt end point. When I try to access /encrypt I get a 403 Forbidden. I am including the Authorization Bearer token in the header. Is there a way to allow the encrypt end point to be called when the server is secured with oAuth, or is it always blocked? Let me know if you would like to see any config files for this server. Just for reference, here are the things that are working. calling /encrypt/status produces {"status":"OK"} The git repository is being pulled because I can