public static DateTimeFormatter matchDateTimeFormatter(String dateTime) {
        if (dateTime.length() == 19) {
            for (Map.Entry<Pattern, DateTimeFormatter> entry :
                    YYYY_MM_DD_HH_MM_SS_19_FORMATTER_MAP_ENTRY_SET) {
                if (entry.getKey().matcher(dateTime).matches()) {
                    return entry.getValue();
                }
            }
        } else if (dateTime.length() > 19) {
            for (Map.Entry<Pattern, DateTimeFormatter> entry :
                    YYYY_MM_DD_HH_MM_SS_M19_FORMATTER_MAP_ENTRY_SET) {
                if (entry.getKey().matcher(dateTime).matches()) {
                    return entry.getValue();
                }
            }
        } else if (dateTime.length() == 14) {
            return YYYY_MM_DD_HH_MM_SS_14_FORMATTER;
        }
        return null;
    }
@Test
    public void testMatchDateTimeFormatter() {
        String datetimeStr = "2020-10-10 10:10:10";
        Assertions.assertEquals(
                "2020-10-10T10:10:10",
                DateTimeUtils.parse(datetimeStr, DateTimeUtils.matchDateTimeFormatter(datetimeStr))
                        .toString());

        datetimeStr = "2020-10-10T10:10:10";
        Assertions.assertEquals(
                "2020-10-10T10:10:10",
                DateTimeUtils.parse(datetimeStr, DateTimeUtils.matchDateTimeFormatter(datetimeStr))
                        .toString());

        datetimeStr = "2020/10/10 10:10:10";
        Assertions.assertEquals(
                "2020-10-10T10:10:10",
                DateTimeUtils.parse(datetimeStr, DateTimeUtils.matchDateTimeFormatter(datetimeStr))
                        .toString());

        datetimeStr = "2020年10月10日 10时10分10秒";
        Assertions.assertEquals(
                "2020-10-10T10:10:10",
                DateTimeUtils.parse(datetimeStr, DateTimeUtils.matchDateTimeFormatter(datetimeStr))
                        .toString());

        datetimeStr = "2020.10.10 10:10:10";
        Assertions.assertEquals(
                "2020-10-10T10:10:10",
                DateTimeUtils.parse(datetimeStr, DateTimeUtils.matchDateTimeFormatter(datetimeStr))
                        .toString());

        datetimeStr = "20201010101010";
        Assertions.assertEquals(
                "2020-10-10T10:10:10",
                DateTimeUtils.parse(datetimeStr, DateTimeUtils.matchDateTimeFormatter(datetimeStr))
                        .toString());

        datetimeStr = "2020-10-10 10:10:10.201";
        Assertions.assertEquals(
                "2020-10-10T10:10:10.201",
                DateTimeUtils.parse(datetimeStr, DateTimeUtils.matchDateTimeFormatter(datetimeStr))
                        .toString());

        datetimeStr = "2020-10-10 10:10:10.201111";
        Assertions.assertEquals(
                "2020-10-10T10:10:10.201111",
                DateTimeUtils.parse(datetimeStr, DateTimeUtils.matchDateTimeFormatter(datetimeStr))
                        .toString());

        datetimeStr = "2020-10-10 10:10:10.201111001";
        Assertions.assertEquals(
                "2020-10-10T10:10:10.201111001",
                DateTimeUtils.parse(datetimeStr, DateTimeUtils.matchDateTimeFormatter(datetimeStr))
                        .toString());
    }