You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shenyu.apache.org by he...@apache.org on 2023/01/04 05:32:39 UTC

[shenyu] branch master updated: add sdk duplicate class check (#4293)

This is an automated email from the ASF dual-hosted git repository.

hefengen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shenyu.git


The following commit(s) were added to refs/heads/master by this push:
     new ecc99379d add sdk duplicate class check (#4293)
ecc99379d is described below

commit ecc99379d5a873044a3968f58b34250a9dee160a
Author: mahaitao <15...@163.com>
AuthorDate: Wed Jan 4 13:32:28 2023 +0800

    add sdk duplicate class check (#4293)
    
    Co-authored-by: mahaitao617 <ma...@mahaitao617deMacBook-Pro.local>
    Co-authored-by: xiaoyu <xi...@apache.org>
---
 .../springboot/starter/sdk/ShenyuSdkAutoConfiguration.java       | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/shenyu-spring-boot-starter/shenyu-spring-boot-starter-sdk/src/main/java/org/apache/shenyu/springboot/starter/sdk/ShenyuSdkAutoConfiguration.java b/shenyu-spring-boot-starter/shenyu-spring-boot-starter-sdk/src/main/java/org/apache/shenyu/springboot/starter/sdk/ShenyuSdkAutoConfiguration.java
index 5bf3c2f0f..0dcecd5e5 100644
--- a/shenyu-spring-boot-starter/shenyu-spring-boot-starter-sdk/src/main/java/org/apache/shenyu/springboot/starter/sdk/ShenyuSdkAutoConfiguration.java
+++ b/shenyu-spring-boot-starter/shenyu-spring-boot-starter-sdk/src/main/java/org/apache/shenyu/springboot/starter/sdk/ShenyuSdkAutoConfiguration.java
@@ -17,6 +17,7 @@
 
 package org.apache.shenyu.springboot.starter.sdk;
 
+import org.apache.shenyu.common.utils.VersionUtils;
 import org.apache.shenyu.register.instance.api.ShenyuInstanceRegisterRepository;
 import org.apache.shenyu.register.instance.api.config.RegisterConfig;
 import org.apache.shenyu.register.instance.core.ShenyuInstanceRegisterRepositoryFactory;
@@ -52,9 +53,13 @@ import java.util.Properties;
  * The type Shenyu sdk autoConfiguration.
  */
 @Configuration(proxyBeanMethods = false)
-@ConditionalOnProperty(value = {"shenyu.sdk.enabled"}, havingValue = "true", matchIfMissing = true)
+@ConditionalOnProperty(value = "shenyu.sdk.enabled", havingValue = "true", matchIfMissing = true)
 public class ShenyuSdkAutoConfiguration {
-    
+
+    static {
+        VersionUtils.checkDuplicate(ShenyuSdkAutoConfiguration.class);
+    }
+
     /**
      * springMvcContract.
      *