| | |
| | | package org.sxkj.gd.xingtu; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import lombok.SneakyThrows; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springblade.core.redis.cache.BladeRedis; |
| | |
| | | try { |
| | | HttpHeaders headers = new HttpHeaders(); |
| | | headers.set("authorization", token); |
| | | log.info("请求外部接口: {} {}", url, body); |
| | | log.info("请求外部接口: {} {}", url, JSON.toJSONString(body)); |
| | | HttpEntity<Object> entity = new HttpEntity<>(body, headers); |
| | | ResponseEntity<R> response = restTemplate.exchange(url, HttpMethod.POST, entity, R.class); |
| | | log.info("响应外部接口: {}", response); |