Spring Cloud config-git back end

Source: Internet
Author: User
Tags tag name

The default implementation of Environmentrepository uses the Git backend, which is convenient for managing upgrades and physical environments, as well as auditing changes. To change the location of the repository, you can set the "Spring.cloud.config.server.git.uri" configuration property (for example, application.yml) in config server. If you set up with the file: prefix, you should work from the local repository so that you can start quickly and easily without a server, but in this case the server will operate directly on the local repository without cloning if it is not bare metal, because the configuration server will never change the remote repository. To extend the config server and make it highly available, you need to point all instances of the server to the same repository, so only the shared file system will work correctly. Even in this case, it is best to use the SSH: protocol of the shared file system repository so that the server can clone it and use the local working copy as the cache.
The repository implementation maps the {label} parameter of an HTTP resource to a git tag (commit ID, branch name, or label). If the Git branch or tag name contains a slash ("/"), you should use a special string "( Specify the label in the HTTP URL to avoid blurring with other URL paths. For example, if the label is Foo/bar, replacing the slash will cause the label to look like Foo () bar. If you use a command-line client like curl (for example, using quotation marks to relay it out of the shell), be careful with the square brackets in the URL.

Placeholders in the Git URI

The Spring Cloud config server supports a git repository URL that contains placeholders for {application} and {profile} (as well as {label}), and, if necessary, remember that the label is applied as a git tag. Therefore, you can easily support the "one repo per application" policy using (for example):
Or use a similar pattern but use the "one per profile" policy with {profiles}.

Spring Cloud config-git back end

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.