From b620b5b897922700f8ccd1a1fdd31dd8a372f7a6 Mon Sep 17 00:00:00 2001 From: lbw Date: Sun, 31 Jan 2021 18:31:38 +0800 Subject: [PATCH] :bookmark: v3.0.4 spring cloud 2020.0.1 remove @SpringCloudApplication --- .../java/com/pig4cloud/pig/auth/PigAuthApplication.java | 6 ++++-- .../com/pig4cloud/pig/gateway/PigGatewayApplication.java | 6 ++++-- .../java/com/pig4cloud/pig/admin/PigAdminApplication.java | 6 ++++-- .../com/pig4cloud/pig/monitor/PigMonitorApplication.java | 6 ++++-- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/pig-auth/src/main/java/com/pig4cloud/pig/auth/PigAuthApplication.java b/pig-auth/src/main/java/com/pig4cloud/pig/auth/PigAuthApplication.java index 39c3c7ff..1e36a8b9 100755 --- a/pig-auth/src/main/java/com/pig4cloud/pig/auth/PigAuthApplication.java +++ b/pig-auth/src/main/java/com/pig4cloud/pig/auth/PigAuthApplication.java @@ -18,14 +18,16 @@ package com.pig4cloud.pig.auth; import com.pig4cloud.pig.common.feign.annotation.EnablePigFeignClients; import org.springframework.boot.SpringApplication; -import org.springframework.cloud.client.SpringCloudApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.cloud.client.discovery.EnableDiscoveryClient; /** * @author lengleng * @date 2018年06月21日 认证授权中心 */ @EnablePigFeignClients -@SpringCloudApplication +@EnableDiscoveryClient +@SpringBootApplication public class PigAuthApplication { public static void main(String[] args) { diff --git a/pig-gateway/src/main/java/com/pig4cloud/pig/gateway/PigGatewayApplication.java b/pig-gateway/src/main/java/com/pig4cloud/pig/gateway/PigGatewayApplication.java index a2bfd784..4b0d641b 100755 --- a/pig-gateway/src/main/java/com/pig4cloud/pig/gateway/PigGatewayApplication.java +++ b/pig-gateway/src/main/java/com/pig4cloud/pig/gateway/PigGatewayApplication.java @@ -18,7 +18,8 @@ package com.pig4cloud.pig.gateway; import com.pig4cloud.pig.common.swagger.annotation.EnablePigSwagger2; import org.springframework.boot.SpringApplication; -import org.springframework.cloud.client.SpringCloudApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.cloud.client.discovery.EnableDiscoveryClient; /** * @author lengleng @@ -27,7 +28,8 @@ import org.springframework.cloud.client.SpringCloudApplication; * 网关应用 */ @EnablePigSwagger2 -@SpringCloudApplication +@EnableDiscoveryClient +@SpringBootApplication public class PigGatewayApplication { public static void main(String[] args) { diff --git a/pig-upms/pig-upms-biz/src/main/java/com/pig4cloud/pig/admin/PigAdminApplication.java b/pig-upms/pig-upms-biz/src/main/java/com/pig4cloud/pig/admin/PigAdminApplication.java index 20d2a2e8..c2b96fa6 100644 --- a/pig-upms/pig-upms-biz/src/main/java/com/pig4cloud/pig/admin/PigAdminApplication.java +++ b/pig-upms/pig-upms-biz/src/main/java/com/pig4cloud/pig/admin/PigAdminApplication.java @@ -20,7 +20,8 @@ import com.pig4cloud.pig.common.feign.annotation.EnablePigFeignClients; import com.pig4cloud.pig.common.security.annotation.EnablePigResourceServer; import com.pig4cloud.pig.common.swagger.annotation.EnablePigSwagger2; import org.springframework.boot.SpringApplication; -import org.springframework.cloud.client.SpringCloudApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.cloud.client.discovery.EnableDiscoveryClient; /** * @author lengleng @@ -29,7 +30,8 @@ import org.springframework.cloud.client.SpringCloudApplication; @EnablePigSwagger2 @EnablePigResourceServer @EnablePigFeignClients -@SpringCloudApplication +@EnableDiscoveryClient +@SpringBootApplication public class PigAdminApplication { public static void main(String[] args) { diff --git a/pig-visual/pig-monitor/src/main/java/com/pig4cloud/pig/monitor/PigMonitorApplication.java b/pig-visual/pig-monitor/src/main/java/com/pig4cloud/pig/monitor/PigMonitorApplication.java index 17b09a6e..92a760dd 100755 --- a/pig-visual/pig-monitor/src/main/java/com/pig4cloud/pig/monitor/PigMonitorApplication.java +++ b/pig-visual/pig-monitor/src/main/java/com/pig4cloud/pig/monitor/PigMonitorApplication.java @@ -18,14 +18,16 @@ package com.pig4cloud.pig.monitor; import de.codecentric.boot.admin.server.config.EnableAdminServer; import org.springframework.boot.SpringApplication; -import org.springframework.cloud.client.SpringCloudApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.cloud.client.discovery.EnableDiscoveryClient; /** * @author lengleng * @date 2018年06月21日 监控中心 */ @EnableAdminServer -@SpringCloudApplication +@EnableDiscoveryClient +@SpringBootApplication public class PigMonitorApplication { public static void main(String[] args) {