From 34981c30a78e8bbd7791131059a9210f9928b62c Mon Sep 17 00:00:00 2001
From: 刘光辉 <347230014@qq.com>
Date: 星期四, 17 九月 2026 09:24:09 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master' into master

---
 jnpf-gateway/src/main/java/jnpf/config/Knife4jConfig.java |   47 +++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 47 insertions(+), 0 deletions(-)

diff --git a/jnpf-gateway/src/main/java/jnpf/config/Knife4jConfig.java b/jnpf-gateway/src/main/java/jnpf/config/Knife4jConfig.java
new file mode 100644
index 0000000..221a714
--- /dev/null
+++ b/jnpf-gateway/src/main/java/jnpf/config/Knife4jConfig.java
@@ -0,0 +1,47 @@
+package jnpf.config;
+
+import com.github.xiaoymin.knife4j.spring.gateway.Knife4jGatewayProperties;
+import com.github.xiaoymin.knife4j.spring.gateway.discover.ServiceChangeListener;
+import com.github.xiaoymin.knife4j.spring.gateway.discover.ServiceDiscoverHandler;
+import com.github.xiaoymin.knife4j.spring.gateway.discover.spi.GatewayServiceExcludeService;
+import jnpf.handler.MyGatewayServiceExcludeService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.cloud.client.discovery.DiscoveryClient;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Lazy;
+import org.springframework.context.annotation.Primary;
+
+@Configuration
+public class Knife4jConfig {
+
+
+//    /**
+//     * Knife4j gateway properties
+//     */
+//    @Autowired
+//    private Knife4jGatewayProperties knife4jGatewayProperties;
+//
+//    @Autowired
+//    private DiscoveryClient discoveryClient;
+
+    /*@Primary
+    @Bean
+    @Lazy(false)
+    public ServiceChangeListener myServiceChangeListener(ServiceDiscoverHandler serviceDiscoverHandler) {
+        return new MyServiceChangeListener(discoveryClient, serviceDiscoverHandler, gatewayProperties);
+    }*/
+
+    /*@Primary
+    @Bean
+    @Lazy(false)
+    public ServiceDiscoverHandler myServiceDiscoverHandler() {
+        return new MyServiceDiscoverHandler(knife4jGatewayProperties);
+    }*/
+
+    @Bean
+    public GatewayServiceExcludeService myGatewayServiceExcludeService(){
+        return new MyGatewayServiceExcludeService();
+    }
+
+}

--
Gitblit v1.8.0