Adds TestConfigServerApplication for use in tests.

This avoids a classpath scanning issue which popped up with boot 2.7+
This commit is contained in:
spencergibb
2022-05-04 18:11:34 -04:00
parent 106a5e5b03
commit c1bff9c27b
22 changed files with 87 additions and 42 deletions

View File

@@ -72,7 +72,7 @@ public class ApplicationBootstrapTests {
String baseDir = ConfigServerTestUtils.getBaseDirectory("spring-cloud-config-sample");
String repo = ConfigServerTestUtils.prepareLocalRepo(baseDir, "target/repos", "config-repo", "target/config");
System.setProperty("repo1", repo);
server = SpringApplication.run(org.springframework.cloud.config.server.ConfigServerApplication.class,
server = SpringApplication.run(org.springframework.cloud.config.server.test.TestConfigServerApplication.class,
// FIXME: configdata why is use legacy needed here and above?
"--spring.config.use-legacy-processing=true", "--server.port=" + configPort,
"--spring.config.name=compositeserver", "--repo1=" + repo);