启用
SpringBoot入口启动类添加注解@EnableFeignClients
1 2 3 4 5 6 7 8
|
@GetMapping(value = "/api/business/contract/info",headers = {"X-ApiKey=${contract.token}"}) String getContractBySn(@RequestParam("ContractSn") String contractSn);
@PostMapping(value = “/getStuDetail”) public ReturnInfo getStudentDetail(@RequestBody Map map,@RequestHeader(name = “token”) String token);
|
处理LocalDateTime
添加依赖
1 2 3 4 5
| <dependency> <groupId>com.fasterxml.jackson.datatype</groupId> <artifactId>jackson-datatype-jsr310</artifactId> <version>2.9.9</version> </dependency>
|
实体属性上
1 2 3
| @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @JsonDeserialize(using = LocalDateTimeDeserializer.class) private LocalDateTime createTime;
|