1、错误信息:

Java 8 date/time type java.time.Duration not supported by default: add Module "com.fasterxml.jackson.datatype:jackson-datatype-jsr310" to enable handling

2、解决办法:

implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.14.1'

3、加上下面两个注解:

// 解决报错 : Java 8 date/time type `java.time.Duration` not supported by default: add Module "com.fasterxml.jackson.datatype:jackson-datatype-jsr310" to enable handling
@JsonDeserialize(using = LocalDateTimeDeserializer.class)
@JsonSerialize(using = LocalDateTimeSerializer.class)
private LocalDateTime createTime;

解决报错:Java 8 date/time type `java.time.Duration` not supported by default: add Module "com.fasterxml.jackson.datatype:jackson-datatype-jsr310" to enable handling的更多相关文章

  1. springMVC 报错:Unknown return value type: java.lang.Integer

    controller层返回值类型为Integer,运行报错: Unknown return value type: java.lang.Integer 解决办法:在此方法上写上注解 @Response ...

  2. Jpa自定义查询报错(Failed to convert from type [java.lang.Object[]] to type)

    Jpa自定义查询报错 问题背景 今天遇到一个奇怪的报错"Failed to convert from type [java.lang.Object[]] to type",这个报错 ...

  3. 【spring boot】spring boot 前台GET请求,传递时间类型的字符串,后台无法解析,报错:Failed to convert from type [java.lang.String] to type [java.util.Date]

    spring boot 前台GET请求,传递时间类型的字符串,后台无法解析,报错:Failed to convert from type [java.lang.String] to type [jav ...

  4. Eclipse 报错The method xxx of type must override a superclass method、Description Resource Path Location Type Java compiler level does not match the version of the installed Java project facet

    问题: 如上图, 没改钱@Override会报错The method run() of type must override a superclass method 原因: java1.5中继承接口是 ...

  5. 解决Eclipse启动报错【Failed to create the Java Virtual Machine】

    电脑:2G内存,WIN7 32位. 启动adt-bundle-windows-x86-20140702\eclipse\eclipse.exe时,报错[Failed to create the Jav ...

  6. Failed to convert from type [java.lang.String] to type [java.util.Date] for value '2020-02-06'; nested exception is java.lang.IllegalArgumentException]解决

    今天做springbook项目前端输入日期传到数据库保存报了一下错误 Whitelabel Error Page This application has no explicit mapping fo ...

  7. mybatis项目启动报错 The content of element type "resultMap" must match "(constructor?,id*,result*,association*,collection*,discriminator?)".

    启动项目报错 2018-02-26 17:09:51,535 ERROR [org.springframework.web.context.ContextLoader] - Context initi ...

  8. 关于编译报错“dereferencing pointer to incomplete type...

    今天同事问了我一个问题,他make的时候报错,“第201行:dereferencing pointer to incomplete type”,我随即查阅了很多资料,也没看出个所以然.最后问题得到了解 ...

  9. 【Xamarin报错】 COMPILETODALVIK : UNEXPECTED TOP-LEVEL error java.lang.OutOfMemoryError: Java heap space

    Xamarin Android 编译报错: COMPILETODALVIK : UNEXPECTED TOP-LEVEL error java.lang.OutOfMemoryError: Java ...

  10. XAMPP里tomcat启动报错:Make sure you have Java JDK or JRE installed and the required ports are free

    以前用XAMPP的时候就是自然而然装好了就可以用,最近重装了新系统,打算在Windows 10里面配置Apache tomcat.PHP.MySQL的开发环境,迟迟试验不成功,于是直接用了XAMPP, ...

随机推荐

  1. 获得lazada商品详情 API 返回值说明

    ​ item_get-获得lazada商品详情 注册开通 lazada.item_get 公共参数 名称 类型 必须 描述 key String 是 调用key(必须以GET方式拼接在URL中) se ...

  2. 作为一个客户经理你一个如何给客户介绍API接口

    随着科技的发展,API(Application Programming Interface,应用程序接口)的应用已经逐渐普及,而API接口作为现代企业实现智能化运营和管理的重要工具之一,也备受关注.作 ...

  3. windows无法连接VMware虚拟机的linux

    遇到的问题:今天使用xshell连接虚拟机,无法连接. 解决过程: 1.测试ping, linux虚拟机能ping通windows主机,可是windows主机ping不通linux虚拟机. 2.查看v ...

  4. 「codeforces - 585E」Present for Vitalik the Philatelist

    link. 设 \(\displaystyle f(x) = \# S', s.t. S' \subseteq S, S' \neq \varnothing, \gcd(S') = x\),\(g(x ...

  5. How can I access GPT-4?

    How can I access GPT-4?   Written by Joshua J.. Updated over a week ago API Access Most users will n ...

  6. [GXYCTF 2019]BabyUpload

    看到题目是一个文件上传 就先随便传的东西试试,看有什么过滤之类的 上传一个一句话木马,提示后缀名不能为ph 随便上传了带有一句话木马的图片,发现上传成功,但这个图片不能直接利用,要先上传一个.htac ...

  7. Newstar CTF 2023

    WEEK1 PWN 1.ezshellcode 直接sendline(shellcode)即可 exp: from pwn import * p = remote("node4.buuoj. ...

  8. C/C++中的ACM题目输入处理——简单易上手

    这里就不按其他文章的以各种情况为分类方法,而是以方法本身为分类办法.因为有一些方法是不同情况通用的,比如已知数量数字的输入和未知数量数字的输入,其实可以用同一种办法. 输入 C/C++ :scanf正 ...

  9. 安装k8s

    完成安装k8s集群以后,推荐使用https://github.com/512team/dhorse发布应用. 准备环境 准备两台服务器节点,如果需要安装虚拟机,可以参考<wmware和cento ...

  10. LLM在text2sql上的应用

    一.前言: 目前,大模型的一个热门应用方向text2sql它可以帮助用户快速生成想要查询的SQL语句.那对于用户来说,大部分简单的sql都是正确的,但对于一些复杂逻辑来说,需要用户在产出SQL的基础上 ...