|
@@ -0,0 +1,56 @@
|
|
|
+package com.yonge.cooleshow.api.feign.properties;
|
|
|
+
|
|
|
+import io.swagger.annotations.ApiModel;
|
|
|
+import io.swagger.annotations.ApiModelProperty;
|
|
|
+import lombok.Data;
|
|
|
+import org.springframework.boot.context.properties.ConfigurationProperties;
|
|
|
+import org.springframework.boot.context.properties.NestedConfigurationProperty;
|
|
|
+import org.springframework.context.annotation.Configuration;
|
|
|
+
|
|
|
+import java.io.Serializable;
|
|
|
+
|
|
|
+/**
|
|
|
+ * OpenFeign配置
|
|
|
+ * Created by Eric.Shang on 2023/2/8.
|
|
|
+ */
|
|
|
+@ConfigurationProperties(prefix = "app-config.open-feign")
|
|
|
+@Configuration
|
|
|
+@Data
|
|
|
+public class OpenFeignConfigProperties {
|
|
|
+
|
|
|
+ @ApiModelProperty("内容管理服务")
|
|
|
+ @NestedConfigurationProperty
|
|
|
+ private ServerConfig cmsServer;
|
|
|
+
|
|
|
+ @ApiModelProperty("后台管理服务")
|
|
|
+ @NestedConfigurationProperty
|
|
|
+ private ServerConfig adminServer;
|
|
|
+
|
|
|
+ @ApiModelProperty("商城后台服务")
|
|
|
+ @NestedConfigurationProperty
|
|
|
+ private ServerConfig mallAdminServer;
|
|
|
+
|
|
|
+ @ApiModelProperty("商城服务")
|
|
|
+ @NestedConfigurationProperty
|
|
|
+ private ServerConfig mallPortalServer;
|
|
|
+
|
|
|
+ @ApiModelProperty("学生服务")
|
|
|
+ @NestedConfigurationProperty
|
|
|
+ private ServerConfig studentServer;
|
|
|
+
|
|
|
+ @ApiModelProperty("老师服务")
|
|
|
+ @NestedConfigurationProperty
|
|
|
+ private ServerConfig teacherServer;
|
|
|
+
|
|
|
+ @ApiModelProperty("机构服务")
|
|
|
+ @NestedConfigurationProperty
|
|
|
+ private ServerConfig tenantServer;
|
|
|
+
|
|
|
+ @Data
|
|
|
+ @ApiModel("OpenFeign服务配置")
|
|
|
+ public static class ServerConfig implements Serializable {
|
|
|
+
|
|
|
+ private String name;
|
|
|
+ private String url;
|
|
|
+ }
|
|
|
+}
|