Merge branch 'boot-2.2.0'
This commit is contained in:
@@ -143,11 +143,12 @@ public class BootLanguagServerBootApp {
|
||||
}
|
||||
|
||||
@Bean Yaml yaml() {
|
||||
//TODO: Yaml is not re-entrant. So its a bit fishy to create a 're-usable' bean for this!
|
||||
return new Yaml();
|
||||
}
|
||||
|
||||
@Bean YamlASTProvider yamlAstProvider(Yaml yaml) {
|
||||
return new YamlParser(yaml);
|
||||
@Bean YamlASTProvider yamlAstProvider() {
|
||||
return new YamlParser();
|
||||
}
|
||||
|
||||
@Bean YamlStructureProvider yamlStructureProvider() {
|
||||
|
||||
@@ -11,9 +11,7 @@
|
||||
package org.springframework.ide.vscode.boot.app;
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
@ConfigurationProperties("languageserver.boot")
|
||||
public class BootLsConfigProperties {
|
||||
|
||||
|
||||
@@ -167,8 +167,7 @@ public class ValuePropertyReferencesProvider implements ReferenceProvider {
|
||||
try {
|
||||
String fileContent = FileUtils.readFileToString(new File(filePath));
|
||||
|
||||
Yaml yaml = new Yaml();
|
||||
YamlASTProvider parser = new YamlParser(yaml);
|
||||
YamlASTProvider parser = new YamlParser();
|
||||
|
||||
URI docURI = Paths.get(filePath).toUri();
|
||||
TextDocument doc = new TextDocument(docURI.toString(), null);
|
||||
|
||||
@@ -59,6 +59,7 @@ import org.springframework.test.context.junit4.SpringRunner;
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@BootLanguageServerTest
|
||||
@Import({AdHocPropertyHarnessTestConf.class, CompilationUnitCacheTest.TestConf.class})
|
||||
public class CompilationUnitCacheTest {
|
||||
|
||||
ProjectsHarness projects = ProjectsHarness.INSTANCE;
|
||||
@@ -72,7 +73,6 @@ public class CompilationUnitCacheTest {
|
||||
@Autowired
|
||||
private MockProjectObserver projectObserver;
|
||||
|
||||
@Import(AdHocPropertyHarnessTestConf.class)
|
||||
@Configuration static class TestConf {
|
||||
|
||||
@Bean SymbolCache symbolCache() {
|
||||
|
||||
@@ -63,6 +63,7 @@ import org.springframework.test.context.junit4.SpringRunner;
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@BootLanguageServerTest
|
||||
@Import({AdHocPropertyHarnessTestConf.class, ValueCompletionTest.TestConf.class})
|
||||
public class ValueCompletionTest {
|
||||
|
||||
@Autowired private BootLanguageServerHarness harness;
|
||||
@@ -75,7 +76,6 @@ public class ValueCompletionTest {
|
||||
@Autowired private AdHocPropertyHarness adHocProperties;
|
||||
|
||||
@Configuration
|
||||
@Import(AdHocPropertyHarnessTestConf.class)
|
||||
static class TestConf {
|
||||
|
||||
//Somewhat strange test setup, test provides a specific test project.
|
||||
|
||||
@@ -56,7 +56,7 @@ import com.google.common.io.Files;
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@BootLanguageServerTest
|
||||
@Import(PropertyEditorTestConf.class)
|
||||
@Import({PropertyEditorTestConf.class,ApplicationPropertiesEditorTest.TestConf.class})
|
||||
public class ApplicationPropertiesEditorTest extends AbstractPropsEditorTest {
|
||||
|
||||
@Autowired DefinitionLinkAsserts definitionLinkAsserts;
|
||||
|
||||
@@ -26,6 +26,7 @@ import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.TestConfiguration;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Import;
|
||||
@@ -53,13 +54,13 @@ import org.springframework.test.context.junit4.SpringRunner;
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@BootLanguageServerTest
|
||||
@Import(PropertyEditorTestConf.class)
|
||||
@Import({PropertyEditorTestConf.class, ApplicationYamlEditorTest.TestConf.class})
|
||||
public class ApplicationYamlEditorTest extends AbstractPropsEditorTest {
|
||||
|
||||
@Autowired
|
||||
private DefinitionLinkAsserts definitionLinkAsserts;
|
||||
|
||||
@Configuration static class TestConf {
|
||||
@Configuration public static class TestConf {
|
||||
@Bean LanguageId defaultLanguageId() {
|
||||
return LanguageId.BOOT_PROPERTIES_YAML;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user