Class TemporalAccessorJsonSerializer<T extends TemporalAccessor>

java.lang.Object
com.fasterxml.jackson.databind.JsonSerializer<T>
tech.corefinance.common.converter.json.TemporalAccessorJsonSerializer<T>
All Implemented Interfaces:
com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitable, io.swagger.v3.core.converter.ModelConverter, org.springframework.beans.factory.InitializingBean
Direct Known Subclasses:
LocalDateSerializer, LocalTimeSerializer, ZonedDateTimeSerializer

@Order public abstract class TemporalAccessorJsonSerializer<T extends TemporalAccessor> extends com.fasterxml.jackson.databind.JsonSerializer<T> implements org.springframework.beans.factory.InitializingBean, io.swagger.v3.core.converter.ModelConverter
  • Constructor Details

    • TemporalAccessorJsonSerializer

      public TemporalAccessorJsonSerializer(@NotNull @NotNull String dateTimeFormat)
  • Method Details

    • postConstruct

      @PostConstruct protected void postConstruct()
    • serialize

      public void serialize(T value, com.fasterxml.jackson.core.JsonGenerator gen, com.fasterxml.jackson.databind.SerializerProvider serializers) throws IOException
      Specified by:
      serialize in class com.fasterxml.jackson.databind.JsonSerializer<T extends TemporalAccessor>
      Throws:
      IOException
    • afterPropertiesSet

      public void afterPropertiesSet() throws Exception
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Throws:
      Exception
    • resolve

      public io.swagger.v3.oas.models.media.Schema<?> resolve(io.swagger.v3.core.converter.AnnotatedType type, io.swagger.v3.core.converter.ModelConverterContext context, Iterator<io.swagger.v3.core.converter.ModelConverter> chain)
      Specified by:
      resolve in interface io.swagger.v3.core.converter.ModelConverter
    • getDateTimeFormat

      public String getDateTimeFormat()
    • getObjectMapper

      public com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
    • getDateTimeFormatter

      public DateTimeFormatter getDateTimeFormatter()
    • getSpringDocProviders

      public org.springdoc.core.providers.SpringDocProviders getSpringDocProviders()
    • setDateTimeFormat

      public void setDateTimeFormat(String dateTimeFormat)
    • setObjectMapper

      public void setObjectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
    • setDateTimeFormatter

      public void setDateTimeFormatter(DateTimeFormatter dateTimeFormatter)
    • setSpringDocProviders

      public void setSpringDocProviders(org.springdoc.core.providers.SpringDocProviders springDocProviders)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object