今天无聊,来看了下1.8的时间类型LocalDateTime,当想把字符串转成LocalDateTime的时候报错!!
java.time.format.DateTimeParseException: Text '2018-05-31 11:43:34.234' could not be parsed: Unable to obtain LocalDateTime from TemporalAccessor: {SecondOfMinute=34, MicroOfSecond=234000, NanoOfSecond=234000000, HourOfAmPm=11, MilliOfSecond=234, MinuteOfHour=43},ISO resolved to 2018-05-31 of type java.time.format.Parsed
找了许久都没发现原因,结果最后发现自己的一个小小失误将HH:mm:ss 写成了 hh:mm:ss,我丢 ,终于对了,java小白真悲伤啊!
内容来源于网络如有侵权请私信删除