ElasticsearchStatusException[Elasticsearch exception [type=mapper_parsing_exception, reason=failed to parse field [createTime] of type [date] in document with id '3000'] ]; nested: ElasticsearchException[Elasticsearch exception [type=illegal_state_exception, reason=Can't get text on a START_OBJECT at 1:125]];
从网上查找尝试第一个办法:
将以下注解加到时间字段上,依然无效
1 2 3 4
@Field(type = FieldType.Date, index = FieldIndex.not_analyzed, store = true, format = DateFormat.custom, pattern = "yyyy-MM-dd HH:mm:ss.SSS") @JsonFormat(shape = JsonFormat.Shape.STRING, pattern ="yyyy-MM-dd HH:mm:ss.SSS") private LocalDateTime createTime;
最近做一个邮件发送功能的时候,发现腾讯企业邮的邮箱,用java发送邮件的时候一直报错: Mail server connection failed; nested exception is javax.mail.MessagingException: Could not connect to SMTP host: smtp.exmail.qq.com, port: 465, response: -1. Failed messages: javax.mail.MessagingException: Could not connect to SMTP host: smtp.exmail.qq.com, port: 465, response: -1
项目引入spring-boot-devtools了以后,如果改动了web项目中的代码,则下次web项目中运行到了上面这行代码,则会出现如下报错 java.lang.ClassCastException: com.xxx.UserInfo cannot be cast to com.xxx.UserInfo 为啥明明显示的是同一个类,却给我显示类型转换异常?