Ryan Wang 👍 传数组我是直接 sort: JSON.stringify([createTime, desc])
这样的入参,但是没有收到后台接口的具体错误信息,只是单纯的 Internal Server Error
传入的参数:
{
api_access_key: "joe2.0",
page: 1,
size: 10,
sort: ["createTime","desc"]
}
响应结果:
{
"status": 500,
"message": "Internal Server Error",
"devMessage": null,
"data": null
}
后台日志见详情(关键信息:No property ["createTime" found for type Post!]):
<日志信息>
2021-11-03 10:54:55.668 ERROR 7271 --- [p1308459870-757] r.h.app.core.ControllerExceptionHandler : Captured an exception:
org.springframework.data.mapping.PropertyReferenceException: No property ["createTime" found for type Post!
at org.springframework.data.mapping.PropertyPath.<init>(PropertyPath.java:90) ~[spring-data-commons-2.5.1.jar:2.5.1]
at org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:437) ~[spring-data-commons-2.5.1.jar:2.5.1]
at org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:413) ~[spring-data-commons-2.5.1.jar:2.5.1]
at org.springframework.data.mapping.PropertyPath.lambda$from$0(PropertyPath.java:366) ~[spring-data-commons-2.5.1.jar:2.5.1]
at java.base/java.util.concurrent.ConcurrentMap.computeIfAbsent(ConcurrentMap.java:330) ~[na:na]
2021-11-03 10:54:55.672 WARN 7271 --- [p1308459870-757] .m.m.a.ExceptionHandlerExceptionResolver : Resolved [org.springframework.data.mapping.PropertyReferenceException: No property ["createTime" found for type Post!]