ny
23 小时以前 b6f169fe43a2b13f351aefc152374fc7f0bc8cb7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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();
    }
 
}