
[英]Jackson does not find a property of a POJO in a Micronaut application compiled to a native image
[英]Failed to find class `com.fasterxml.jackson.databind.deser.std.DateDeserializers$TimestampDeserializer` for handlingvaluesof type `java.sql.Timestamp`
Failed to find class `com.fasterxml.jackson.databind.deser.std.DateDeserializers$TimestampDeserializer` for handling values of type
`java.sql.Timestamp`, problem: (java.lang.ClassNotFoundException) com.fasterxml.jackson.databind.deser.std.DateDeserializers$TimestampDeserializer
在 lambda 上通过本机映像运行时出现此错误; 在当地运行良好
似乎在从数据库中获取时间戳(也在时间戳中)时出现错误。
graalvm:20.3.2 gradle: 7 java: 8
尝试在 reflection.Json 文件中添加以下内容
{
"name": "com.fasterxml.jackson.databind.deser.std.DateDeserializers",
"allDeclaredConstructors": true,
"allPublicConstructors": true,
"allDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredClasses": true,
"allPublicClasses": true,
"allDeclaredFields": true
},
尝试添加 build.gradle
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.14.1'
您的反射配置应该提到不同的 class,
com.fasterxml.jackson.databind.deser.std.DateDeserializers$TimestampDeserializer
而不是
com.fasterxml.jackson.databind.deser.std.DateDeserializers
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.