Class DateFormatRegister

java.lang.Object
top.tangyh.basic.cloud.feign.DateFormatRegister
All Implemented Interfaces:
org.springframework.cloud.openfeign.FeignFormatterRegistrar, org.springframework.format.FormatterRegistrar

public class DateFormatRegister extends Object implements org.springframework.cloud.openfeign.FeignFormatterRegistrar
在feign调用方配置, 解决入参和出参是以下类型. 1. @RequestParam("date") Date date 2. @RequestParam("date") LocalDateTime date 3. @RequestParam("date") LocalDate date 4. @RequestParam("date") LocalTime date
Author:
zuihou
  • Constructor Details

    • DateFormatRegister

      public DateFormatRegister()
  • Method Details

    • registerFormatters

      public void registerFormatters(org.springframework.format.FormatterRegistry registry)
      Specified by:
      registerFormatters in interface org.springframework.format.FormatterRegistrar