Skip to content
Snippets Groups Projects
Commit 61e55efa authored by Henning's avatar Henning
Browse files

added to YamlReader -> .loadConfigYAML

parent 579a4744
No related branches found
No related tags found
No related merge requests found
......@@ -193,7 +193,7 @@ public class PrioritizationService {
private static int sumTestPrioritiesByYAML(int size, int score, int dependency) {
YamlReader yamlReader = new YamlReader();
MigrationYaml yaml = yamlReader.loadMigrationYaml();
MigrationYaml yaml = yamlReader.loadConfigYaml();
int sum = 0;
try {
......
......@@ -24,7 +24,7 @@ public class ConfigController {
public String[] getConfig(@PathVariable(required = true) Long projectId) throws IOException {
YamlReader yamlReader = new YamlReader();
MigrationYaml yaml = yamlReader.loadMigrationYaml();
MigrationYaml yaml = yamlReader.loadConfigYaml();
List<String> configs = new ArrayList<String>();
configs.add(yaml.getPriority().getFormularPart0());
......
......@@ -23,6 +23,22 @@ public class YamlReader {
}
return yaml;
}
public MigrationYaml loadConfigYaml() {
ObjectMapper mapper = new ObjectMapper(new YAMLFactory());
MigrationYaml yaml = null;
try {
yaml = mapper.readValue(new File("src/main/resources/config.yaml"), MigrationYaml.class);
}
catch(Exception e) {
System.out.println(e.getMessage());
}
return yaml;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment