Versions Compared

Key

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

The spring cloud config server reads its values from file system (possibly on one central location). It is possible to stop using files on the filesystem, and read property files out of gitGit. This has advantages also the properties are version managed using a standard approach.
To be able to do this, these change have to be made:

bootstrap.properties - for using the file system

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



bootstrap.properties - for using GIT Git - basic authentication

type
Code Block
spring:
    cloud:
       config:
           server:
               git:
                  uri: .cloud.config.server.git.uri=https://git.blueriq.com/config-repo.git
                  basedir: target/config
                  username: <git_username>
                  password: <git_password>
UI Text Box
spring.cloud.config.server.git.basedir=target/config
spring.cloud.config.server.git.username=<git_username>
spring.cloud.config.server.git.password=<git_password>


Note

Please note that when using

GIT

Git, the development

plugin

dashboard has limited functionality. As properties can only be read from

GIT

Git and not written, the development tools plugin can only read values and not write them. Any changes made with the development

toolbar

dashboard may work during your session, but starting a new session or reloading the application will read the original values from

GIT

Git again.

For shortcut properties, they will not even be updated in your current session.

This is only an issue for development or test environments, as the development tools plugin

is

should not

present

be enabled on production environments.