From 5c5272d82743f6d400e16fb53ce79c724dfb1dc0 Mon Sep 17 00:00:00 2001 From: jianjun Date: Fri, 3 Jul 2020 11:13:00 +0800 Subject: [PATCH] =?UTF-8?q?gateway=E6=8E=92=E9=99=A4=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/GatewayApplication.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/epmet-gateway/src/main/java/com/epmet/GatewayApplication.java b/epmet-gateway/src/main/java/com/epmet/GatewayApplication.java index 352ae0df92..5c8d111813 100644 --- a/epmet-gateway/src/main/java/com/epmet/GatewayApplication.java +++ b/epmet-gateway/src/main/java/com/epmet/GatewayApplication.java @@ -8,11 +8,13 @@ package com.epmet; +import com.epmet.commons.tools.aspect.ServletExceptionHandler; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.cloud.openfeign.EnableFeignClients; import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.annotation.FilterType; /** * 网关服务 @@ -20,9 +22,10 @@ import org.springframework.context.annotation.ComponentScan; * @author Mark sunlightcs@gmail.com * @since 1.0.0 */ -@SpringBootApplication +@SpringBootApplication() @EnableDiscoveryClient @EnableFeignClients +@ComponentScan(basePackages = {"com.epmet.*"}, excludeFilters = @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = {ServletExceptionHandler.class})) public class GatewayApplication { public static void main(String[] args) {