Browse Source

增加core-solar组件与测试代码

luoshi 3 năm trước cách đây
mục cha
commit
30e3acd8d6

+ 4 - 0
api-demo/pom.xml

@@ -45,6 +45,10 @@
             <groupId>com.qmth.boot</groupId>
             <artifactId>core-uid</artifactId>
         </dependency>
+        <dependency>
+            <groupId>com.qmth.boot</groupId>
+            <artifactId>core-solar</artifactId>
+        </dependency>
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-test</artifactId>

+ 26 - 0
api-demo/src/main/java/com/qmth/demo/api/controller/SolarController.java

@@ -0,0 +1,26 @@
+package com.qmth.demo.api.controller;
+
+import com.qmth.boot.api.constant.ApiConstant;
+import com.qmth.boot.core.solar.service.SolarService;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+
+@RestController
+@RequestMapping(ApiConstant.DEFAULT_URI_PREFIX + "/solar")
+public class SolarController {
+
+    @Resource
+    private SolarService solarService;
+
+    @RequestMapping("/app/info")
+    public Object appInfo() {
+        return solarService.getAppInfo();
+    }
+
+    @RequestMapping("/org/list")
+    public Object orgList() {
+        return solarService.getOrgList();
+    }
+}

+ 8 - 0
api-demo/src/main/resources/application.properties

@@ -25,3 +25,11 @@ com.qmth.redis.host=127.0.0.1
 com.qmth.fss.config=/Users/luoshi/test
 com.qmth.fss.server=https://server.com
 
+##solar online
+#com.qmth.solar.server=http://solar-internal.qmth.com.cn
+#com.qmth.solar.accessKey=b3e4601f4018489599253c45668dc55f
+#com.qmth.solar.accessSecret=Fo7C4gyRaka49f0IJuS8jJcQordoepA1
+
+##solar offline
+com.qmth.solar.license=/Users/luoshi/Downloads/solar/test.lic
+

+ 10 - 0
pom.xml

@@ -51,6 +51,16 @@
                 <artifactId>core-fss</artifactId>
                 <version>${qmth.boot.version}</version>
             </dependency>
+            <dependency>
+                <groupId>com.qmth.boot</groupId>
+                <artifactId>core-retrofit</artifactId>
+                <version>${qmth.boot.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>com.qmth.boot</groupId>
+                <artifactId>core-solar</artifactId>
+                <version>${qmth.boot.version}</version>
+            </dependency>
             <dependency>
                 <groupId>com.qmth.boot</groupId>
                 <artifactId>data-redis</artifactId>