diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index a9110334eaa..8955c871c00 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -47,10 +47,10 @@ jobs:
run: mvn -B clean package -P travis jacoco:report -Dmaven.gitcommitid.skip=true
- name: JDK 11
if: matrix.jdk == '11'
- run: mvn clean compile -Dmaven.gitcommitid.skip=true
+ run: mvn -B clean compile -Dmaven.gitcommitid.skip=true
- name: JDK 17
if: matrix.jdk == '17'
- run: mvn clean compile -Dmaven.gitcommitid.skip=true
+ run: mvn -B clean compile -Dmaven.gitcommitid.skip=true
- name: Upload coverage to Codecov
if: matrix.jdk == '8'
uses: codecov/codecov-action@v1
diff --git a/CHANGES.md b/CHANGES.md
index 1b56e8e7a29..a55583abdfa 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -31,6 +31,7 @@ Apollo 2.0.0
* [Fix the NPE occurred when using EnableApolloConfig with Spring 3.1.1](https://github.com/apolloconfig/apollo/pull/4180)
* [Bump guava from 29.0 to 31.0.1](https://github.com/apolloconfig/apollo/pull/4182)
* [fix the json number display issue when it's longer than 16](https://github.com/apolloconfig/apollo/pull/4183)
+* [Bump client springboot version](https://github.com/apolloconfig/apollo/pull/4189)
------------------
All issues and pull requests are [here](https://github.com/ctripcorp/apollo/milestone/8?closed=1)
diff --git a/apollo-client/pom.xml b/apollo-client/pom.xml
index c4a49d80c53..3ad5defbf2d 100644
--- a/apollo-client/pom.xml
+++ b/apollo-client/pom.xml
@@ -29,19 +29,6 @@
${project.artifactId}
-
-
-
-
-
- org.springframework.boot
- spring-boot-dependencies
- 1.5.16.RELEASE
- pom
- import
-
-
-
diff --git a/apollo-client/src/main/java/com/ctrip/framework/apollo/util/yaml/YamlParser.java b/apollo-client/src/main/java/com/ctrip/framework/apollo/util/yaml/YamlParser.java
index 25eae814001..9d36f15a66b 100644
--- a/apollo-client/src/main/java/com/ctrip/framework/apollo/util/yaml/YamlParser.java
+++ b/apollo-client/src/main/java/com/ctrip/framework/apollo/util/yaml/YamlParser.java
@@ -18,22 +18,23 @@
import com.ctrip.framework.apollo.build.ApolloInjector;
import com.ctrip.framework.apollo.util.factory.PropertiesFactory;
-import java.util.AbstractMap;
import java.util.Collection;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Properties;
-import java.util.Set;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.yaml.snakeyaml.DumperOptions;
+import org.yaml.snakeyaml.LoaderOptions;
import org.yaml.snakeyaml.Yaml;
import org.yaml.snakeyaml.constructor.SafeConstructor;
import org.yaml.snakeyaml.nodes.MappingNode;
import org.yaml.snakeyaml.parser.ParserException;
import com.ctrip.framework.apollo.core.utils.StringUtils;
+import org.yaml.snakeyaml.representer.Representer;
/**
* Transplanted from org.springframework.beans.factory.config.YamlProcessor since apollo can't depend on Spring directly
@@ -64,7 +65,9 @@ public void process(Properties properties, Map map) {
* Create the {@link Yaml} instance to use.
*/
private Yaml createYaml() {
- return new Yaml(new StrictMapAppenderConstructor());
+ LoaderOptions loadingConfig = new LoaderOptions();
+ loadingConfig.setAllowDuplicateKeys(false);
+ return new Yaml(new SafeConstructor(), new Representer(), new DumperOptions(), loadingConfig);
}
private boolean process(MatchCallback callback, Yaml yaml, String content) {
@@ -163,43 +166,4 @@ private interface MatchCallback {
void process(Properties properties, Map map);
}
- /**
- * A specialized {@link SafeConstructor} that checks for duplicate keys.
- */
- private static class StrictMapAppenderConstructor extends SafeConstructor {
-
- // Declared as public for use in subclasses
- StrictMapAppenderConstructor() {
- super();
- }
-
- @Override
- protected Map