@ConfigurationProperties(value="spring.cloud.config.server.git") public class MultipleJGitEnvironmentRepository extends JGitEnvironmentRepository
EnvironmentRepository
that based on one or more git repositories. Can be
configured just like a single JGitEnvironmentRepository
, for the "default"
properties, and then additional repositories can be registered by name. The simplest
form of the registration is just a map from name to uri (plus credentials if needed),
where each app has its own git repository. As well as a name you can provide a pattern
that matches on the application name (or even a list of patterns). Each sub-repository
additionally can have its own search paths (subdirectories inside the top level of the
repository).Modifier and Type | Class and Description |
---|---|
static class |
MultipleJGitEnvironmentRepository.PatternMatchingJGitEnvironmentRepository |
Constructor and Description |
---|
MultipleJGitEnvironmentRepository(org.springframework.core.env.ConfigurableEnvironment environment) |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
Environment |
findOne(String application,
String profile,
String label) |
Map<String,MultipleJGitEnvironmentRepository.PatternMatchingJGitEnvironmentRepository> |
getRepos() |
void |
setRepos(Map<String,MultipleJGitEnvironmentRepository.PatternMatchingJGitEnvironmentRepository> repos) |
getDefaultLabel, getGitFactory, getTimeout, isCloneOnStart, setCloneOnStart, setGitFactory, setTimeout
clean, getBasedir, getEnvironment, getPassword, getSearchLocations, getSearchPaths, getUri, getUsername, getWorkingDirectory, setBasedir, setEnvironment, setPassword, setSearchPaths, setUri, setUsername
public MultipleJGitEnvironmentRepository(org.springframework.core.env.ConfigurableEnvironment environment)
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
afterPropertiesSet
in class JGitEnvironmentRepository
Exception
public void setRepos(Map<String,MultipleJGitEnvironmentRepository.PatternMatchingJGitEnvironmentRepository> repos)
public Map<String,MultipleJGitEnvironmentRepository.PatternMatchingJGitEnvironmentRepository> getRepos()
public Environment findOne(String application, String profile, String label)
findOne
in interface EnvironmentRepository
findOne
in class JGitEnvironmentRepository
Copyright © 2015 Pivotal Software, Inc.. All rights reserved.