Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

For an explanation about spring cloud config see http://cloud.spring.io/spring-cloud-config/spring-cloud-config.html 

...

 

1. Client

 

Spring config client is integrated in the blueriq-web. .

...

Code Block
spring:
  cloud:
    config:
      uri: http://localhost:8888
      username: <cloud-server-username> (*)
      password: <cloud-server-password> (*)
      failFast: true
      retry:
        max-attempts: 10
        initial-interval: 5000
        max-interval: 10000

* See #gitbasicauth 

application.properties will not contain any property meant for the config client

...

Code Block
<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-config</artifactId>
</dependency>
<dependency>
    <groupId>org.springframework.retry</groupId>
    <artifactId>spring-retry</artifactId>
</dependency>
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-aop</artifactId>
</dependency>

 


 

2. Server

Spring config server will run separately and handle the property files. The client will communicate with the server to get the property files.

The property files will either come from the file-system or use GIT.

 

bootstrap.properties

Code Block
encrypt:
  failOnError: false
  key: "IGotTheKey"
  key-store:
    secret: "IGotTheSecret"
spring:
  cloud:
    config:
      server:
        bootstrap: true (*)

* Indicates that the server should read it’s own application.properties from the remote config server (GIT or filesystem)

 

1.1. bootstrap.properties extended for using the file-system

Code Block
spring:
  profiles:
    active: native
  cloud:
    config:
      server:
        native:
          searchLocations: file:D:/local-properties

 

1.2. bootstrap.properties extended for using GIT - basic authentication 

Anchor
gitbasicauth
gitbasicauth

Code Block
spring:
  cloud:
    config:
      server:
        git:
          uri: https://git.blueriq.com/config-repo.git
          basedir: target/config
          username: testuser<git_username>
          password: martijnlustwhisky<git_password>

 

 

File system

// TODO

Git repository

...