调试调用工作流。
This commit is contained in:
@@ -102,6 +102,11 @@
|
|||||||
<scope>system</scope>
|
<scope>system</scope>
|
||||||
<systemPath>${project.basedir}/src/main/resources/lib/pageoffice4.5.0.9.jar</systemPath>
|
<systemPath>${project.basedir}/src/main/resources/lib/pageoffice4.5.0.9.jar</systemPath>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!-- feign调用 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.cloud</groupId>
|
||||||
|
<artifactId>spring-cloud-starter-openfeign</artifactId>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
+33
@@ -0,0 +1,33 @@
|
|||||||
|
package com.jero.modules.wkflow.controller;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.jero.common.aspect.annotation.AutoLog;
|
||||||
|
import com.jero.modules.wkflow.feginClient.impl.WorkFlowFeignClientImpl;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
@Api(tags="测试调用工作流接口")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/test")
|
||||||
|
@Slf4j
|
||||||
|
public class TestController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private WorkFlowFeignClientImpl workFlowFeignClient;
|
||||||
|
|
||||||
|
@AutoLog(value = "测试Get请求")
|
||||||
|
@GetMapping("/testGet")
|
||||||
|
public String testGet(@RequestParam("param") String param){
|
||||||
|
return workFlowFeignClient.testGet(param);
|
||||||
|
}
|
||||||
|
|
||||||
|
@AutoLog(value = "测试Post请求")
|
||||||
|
@PostMapping("/testPost")
|
||||||
|
public JSONObject testPost(@RequestBody JSONObject jsonObject){
|
||||||
|
return workFlowFeignClient.testPost(jsonObject);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
+16
@@ -0,0 +1,16 @@
|
|||||||
|
package com.jero.modules.wkflow.feginClient;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
|
||||||
|
@FeignClient(value = "weilai-wkflow")
|
||||||
|
public interface WorkFlowFeignClient {
|
||||||
|
@RequestMapping(value = "/bat-wkflow/task/testGet",method = RequestMethod.GET)
|
||||||
|
String testGet(@RequestParam("param") String param);
|
||||||
|
|
||||||
|
@RequestMapping(value = "/bat-wkflow/task/testPost",method = RequestMethod.POST,headers = {"content-type=application/json"})
|
||||||
|
JSONObject testPost(String jsonObject);
|
||||||
|
}
|
||||||
+21
@@ -0,0 +1,21 @@
|
|||||||
|
package com.jero.modules.wkflow.feginClient.impl;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.jero.modules.wkflow.feginClient.WorkFlowFeignClient;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class WorkFlowFeignClientImpl{
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private WorkFlowFeignClient workFlowFeignClient;
|
||||||
|
|
||||||
|
public String testGet(String param) {
|
||||||
|
return workFlowFeignClient.testGet(param);
|
||||||
|
}
|
||||||
|
|
||||||
|
public JSONObject testPost(JSONObject jsonObject) {
|
||||||
|
return workFlowFeignClient.testPost(jsonObject.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -21,8 +21,8 @@ import java.net.UnknownHostException;
|
|||||||
**/
|
**/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
//@EnableEurekaClient
|
@EnableEurekaClient
|
||||||
//@EnableFeignClients
|
@EnableFeignClients
|
||||||
public class LawNioApplication extends SpringBootServletInitializer {
|
public class LawNioApplication extends SpringBootServletInitializer {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -320,9 +320,9 @@ OCR:
|
|||||||
eureka:
|
eureka:
|
||||||
client:
|
client:
|
||||||
#是否将自己注册到Eureka Server上,默认为true
|
#是否将自己注册到Eureka Server上,默认为true
|
||||||
register-with-eureka: false
|
register-with-eureka: true
|
||||||
##是否从Eureka Server上获取注册信息,默认为true
|
##是否从Eureka Server上获取注册信息,默认为true
|
||||||
fetch-registry: false
|
fetch-registry: true
|
||||||
service-url:
|
service-url:
|
||||||
defaultZone: http://127.0.0.1:8123/eureka/
|
defaultZone: http://127.0.0.1:8123/eureka/
|
||||||
## people 2.0
|
## people 2.0
|
||||||
|
|||||||
Reference in New Issue
Block a user