Skip to content

Commit

Permalink
optimize: upgrade some dependencies (#686)
Browse files Browse the repository at this point in the history
  • Loading branch information
slievrly committed Aug 31, 2024
1 parent ee69491 commit 8bd5db5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,24 @@
*/
package org.apache.seata.config;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Files;

import org.apache.seata.model.E2EConfig;
import org.apache.seata.model.E2EWrapper;
import org.yaml.snakeyaml.LoaderOptions;
import org.yaml.snakeyaml.Yaml;
import org.yaml.snakeyaml.constructor.Constructor;

import java.io.*;
import java.nio.file.Files;

/**
* @author [email protected]
*/
public class ConfigReader {
public static E2EConfig readConfig(File configFile) throws IOException {
Yaml yaml = new Yaml(new Constructor(E2EWrapper.class));
LoaderOptions loaderOptions = new LoaderOptions();
Yaml yaml = new Yaml(new Constructor(E2EWrapper.class, loaderOptions));
E2EWrapper e2EWrapper = new E2EWrapper();
InputStream inputStream = Files.newInputStream(configFile.toPath());
// 从YAML文件读取数据并转换为Java对象
Expand Down
4 changes: 2 additions & 2 deletions e2e-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>1.32</version>
<version>2.0</version>
</dependency>
<dependency>
<groupId>org.freemarker</groupId>
Expand All @@ -41,7 +41,7 @@
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.2.9</version>
<version>1.2.13</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
Expand Down

0 comments on commit 8bd5db5

Please sign in to comment.