<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>AnnotationFormatterFactory on 知识铺的博客</title>
    <link>https://index.zshipu.com/geek/tags/AnnotationFormatterFactory/</link>
    <description>Recent content in AnnotationFormatterFactory on 知识铺的博客</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>zh-CN</language>
    <lastBuildDate>Wed, 06 Mar 2024 13:17:00 +0000</lastBuildDate>
    <atom:link href="https://index.zshipu.com/geek/tags/AnnotationFormatterFactory/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Spring-DateTimeFormatAnnotationFormatterFactory</title>
      <link>https://index.zshipu.com/geek/post/code/docs/Spring/clazz/format/AnnotationFormatterFactory/Spring-DateTimeFormatAnnotationFormatterFactory/</link>
      <pubDate>Wed, 06 Mar 2024 13:17:00 +0000</pubDate>
      <guid>https://index.zshipu.com/geek/post/code/docs/Spring/clazz/format/AnnotationFormatterFactory/Spring-DateTimeFormatAnnotationFormatterFactory/</guid>
      <description>Spring DateTimeFormatAnnotationFormatterFactory 类全路径: org.springframework.format.datetime.DateTimeFormatAnnotationFormatterFactory 类图 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 public class DateTimeFormatAnnotationFormatterFactory extends EmbeddedValueResolutionSupport implements AnnotationFormatterFactory&amp;lt;DateTimeFormat&amp;gt; { /** * 字段类型 */ private static final Set&amp;lt;Class&amp;lt;?&amp;gt;&amp;gt; FIELD_TYPES; @Override public Set&amp;lt;Class&amp;lt;?&amp;gt;&amp;gt; getFieldTypes() { return FIELD_TYPES; } @Override public Printer&amp;lt;?&amp;gt; getPrinter(DateTimeFormat annotation, Class&amp;lt;?&amp;gt; fieldType) { return getFormatter(annotation, fieldType); } @Override public Parser&amp;lt;?&amp;gt; getParser(DateTimeFormat annotation, Class&amp;lt;?&amp;gt; fieldType) { return getFormatter(annotation, fieldType); } protected Formatter&amp;lt;Date&amp;gt; getFormatter(DateTimeFormat annotation, Class&amp;lt;?&amp;gt; fieldType) { DateFormatter formatter = new DateFormatter(); // style String style = resolveEmbeddedValue(annotation.style()); // 判断时间格式是</description>
    </item>
  </channel>
</rss>
