Add spring.config.import to config sample. Fixes #2841
This commit is contained in:
@@ -7,3 +7,8 @@ logging:
|
||||
levels:
|
||||
org.springframework.boot.env.PropertySourcesLoader: TRACE
|
||||
org.springframework.web: DEBUG
|
||||
spring:
|
||||
application:
|
||||
name: bar
|
||||
config:
|
||||
import: "optional:configserver:"
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
package sample;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Map;
|
||||
|
||||
import org.junit.jupiter.api.AfterAll;
|
||||
@@ -57,8 +58,11 @@ public class ConfigDataOrderingIntegrationTests {
|
||||
|
||||
@BeforeAll
|
||||
public static void startConfigServer() {
|
||||
String testResourcesDir = new File("src/test/resources").getAbsolutePath();
|
||||
server = SpringApplication.run(org.springframework.cloud.config.server.test.TestConfigServerApplication.class,
|
||||
"--spring.profiles.active=native", "--server.port=" + configPort, "--spring.config.name=server");
|
||||
"--spring.profiles.active=native", "--server.port=" + configPort, "--spring.config.name=server",
|
||||
"--spring.cloud.config.server.native.search-locations=file://" + testResourcesDir + ",file://"
|
||||
+ testResourcesDir + "/config");
|
||||
|
||||
System.setProperty("spring.cloud.config.uri", "http://localhost:" + configPort);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user