| | |
| | | ResponseEntity responseEntity = null; |
| | | //配置c_service 时请注意 如果是以out 开头的调用外部的地址 |
| | | RestTemplate restTemplate ; |
| | | // if (Environment.isStartBootWay()) { |
| | | if (Environment.isStartBootWay()) { |
| | | restTemplate = ApplicationContextFactory.getBean("outRestTemplate", RestTemplate.class); |
| | | // } else { |
| | | // restTemplate = ApplicationContextFactory.getBean("restTemplate", RestTemplate.class); |
| | | // } |
| | | } else { |
| | | restTemplate = ApplicationContextFactory.getBean("restTemplate", RestTemplate.class); |
| | | } |
| | | |
| | | try { |
| | | if (CommonConstant.HTTP_METHOD_GET.equals(service.getMethod())) { |
| | |
| | | requestUrl = service.getUrl() + "?" + param; |
| | | } |
| | | } |
| | | |
| | | if (Environment.isStartBootWay()) { |
| | | requestUrl = BootReplaceUtil.replaceServiceName(requestUrl); |
| | | } |
| | | |
| | | responseEntity = restTemplate.exchange(requestUrl, HttpMethod.GET, httpEntity, String.class); |
| | | } else if (CommonConstant.HTTP_METHOD_PUT.equals(service.getMethod())) { |
| | |
| | | |
| | | /** |
| | | * 开始调度微服务 |
| | | * |
| | | * @param appService |
| | | * @param dataFlow |
| | | * @param reqJson |