org.springframework.cloud.config.server.environment.NativeEnvironmentRepository Java Examples
The following examples show how to use
org.springframework.cloud.config.server.environment.NativeEnvironmentRepository.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: FileMonitorConfigurationTest.java From spring-cloud-config with Apache License 2.0 | 5 votes |
@Test public void testStart_withNativeEnvironmentRepository() { // given NativeEnvironmentRepository repository = createNativeEnvironmentRepository(); ReflectionTestUtils.setField(fileMonitorConfiguration, "nativeEnvironmentRepository", repository); // when fileMonitorConfiguration.start(); // then assertOnDirectory(1); }
Example #2
Source File: ResourceControllerTests.java From spring-cloud-config with Apache License 2.0 | 5 votes |
@Before public void init() { this.context = new SpringApplicationBuilder( NativeEnvironmentRepositoryTests.class).web(WebApplicationType.NONE) .run(); this.environmentRepository = new NativeEnvironmentRepository( this.context.getEnvironment(), new NativeEnvironmentProperties()); this.repository = new GenericResourceRepository(this.environmentRepository); this.repository.setResourceLoader(this.context); this.controller = new ResourceController(this.repository, this.environmentRepository, this.resourceEncryptorMap); this.context.close(); }
Example #3
Source File: GenericResourceRepositoryTests.java From spring-cloud-config with Apache License 2.0 | 5 votes |
@Before public void init() { this.context = new SpringApplicationBuilder( NativeEnvironmentRepositoryTests.class).web(WebApplicationType.NONE) .run(); this.nativeRepository = new NativeEnvironmentRepository( this.context.getEnvironment(), new NativeEnvironmentProperties()); this.repository = new GenericResourceRepository(this.nativeRepository); this.repository.setResourceLoader(this.context); this.context.close(); }
Example #4
Source File: NativeRepositoryConfiguration.java From flair-registry with Apache License 2.0 | 4 votes |
@Bean public NativeEnvironmentRepository nativeEnvironmentRepository(NativeEnvironmentRepositoryFactory factory, NativeEnvironmentProperties environmentProperties) { return factory.build(environmentProperties); }
Example #5
Source File: NativeRepositoryConfiguration.java From jhipster-registry with Apache License 2.0 | 4 votes |
@Bean public NativeEnvironmentRepository nativeEnvironmentRepository(NativeEnvironmentRepositoryFactory factory, NativeEnvironmentProperties environmentProperties) { return factory.build(environmentProperties); }
Example #6
Source File: FileMonitorConfigurationTest.java From spring-cloud-config with Apache License 2.0 | 4 votes |
private NativeEnvironmentRepository createNativeEnvironmentRepository() { ConfigurableEnvironment environment = createConfigurableEnvironment(); NativeEnvironmentProperties properties = new NativeEnvironmentProperties(); properties.setSearchLocations(new String[] { "classpath:pathsamples" }); return new NativeEnvironmentRepository(environment, properties); }
Example #7
Source File: EnvironmentRepositoryConfiguration.java From spring-cloud-config with Apache License 2.0 | 4 votes |
@Bean public NativeEnvironmentRepository nativeEnvironmentRepository( NativeEnvironmentRepositoryFactory factory, NativeEnvironmentProperties environmentProperties) { return factory.build(environmentProperties); }