在使用rest-api插件时候,如果entity中存在一个字段
@Transient
@MetaProperty
protected List<String> token;
在客户端调用时候,会报异常.
异常内容就是无法将List转换为String类型.
初步怀疑是序列化时候的问题.
在使用rest-api插件时候,如果entity中存在一个字段
@Transient
@MetaProperty
protected List<String> token;
在客户端调用时候,会报异常.
异常内容就是无法将List转换为String类型.
初步怀疑是序列化时候的问题.
有相关的错误日志吗?entity 继承的类和实现的接口也发一下。
错误log:
java.lang.ClassCastException: java.util.Arrays$ArrayList cannot be cast to java.lang.String
project.zip (287.2 KB)
error.log (13.3 KB)
CUBA 不支持这么使用 MetaProperty。具体看这个帖子:
https://www.cuba-platform.com/discuss/t/metaproperty-with-list-map-string-string-serialize-error/9921