Эх сурвалжийг харах

开放API - 获取商户设备列表

tanbin 1 жил өмнө
parent
commit
f0f1690a4a

+ 42 - 0
device-api-service/src/main/java/com/xy/open/config/OpenServiceConfig.java

@@ -0,0 +1,42 @@
+package com.xy.open.config;
+
+
+import com.xy.bean.ServiceConfig;
+import com.xy.configuration.AlipayServiceConfiguration;
+import com.xy.swagger.SwaggerSupport;
+import org.springframework.context.annotation.Configuration;
+import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;
+
+/**
+ * 开放平台功能
+ *
+ * @author tanghc
+ */
+@Configuration
+public class OpenServiceConfig extends AlipayServiceConfiguration {
+
+    static {
+        ServiceConfig.getInstance().getI18nModules().add("i18n/isp/goods_error");
+    }
+
+
+    /**
+     * 开启文档,本地微服务文档地址:http://localhost:2222/doc.html
+     * http://ip:port/v2/api-docs
+     */
+    @Configuration
+    @EnableSwagger2WebMvc
+    public static class Swagger2 extends SwaggerSupport {
+        @Override
+        protected String getDocTitle() {
+            return "智能货柜-设备接口文档";
+        }
+
+        @Override
+        protected boolean swaggerAccessProtected() {
+            return false;
+        }
+    }
+
+}
+