“code”: “error.ai.nova_galaxy.unknown_error”,
“detail”: “Type definition error: [simple type, class com.alo7.nova.galaxy.bean.tts.BatchTtsRequest
T
r
i
p
l
e
T
t
s
]
;
n
e
s
t
e
d
e
x
c
e
p
t
i
o
n
i
s
c
o
m
.
f
a
s
t
e
r
x
m
l
.
j
a
c
k
s
o
n
.
d
a
t
a
b
i
n
d
.
e
x
c
.
I
n
v
a
l
i
d
D
e
f
i
n
i
t
i
o
n
E
x
c
e
p
t
i
o
n
:
C
a
n
n
o
t
c
o
n
s
t
r
u
c
t
i
n
s
t
a
n
c
e
o
f
‘
c
o
m
.
a
l
o
7.
n
o
v
a
.
g
a
l
a
x
y
.
b
e
a
n
.
t
t
s
.
B
a
t
c
h
T
t
s
R
e
q
u
e
s
t
TripleTts]; nested exception is com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of `com.alo7.nova.galaxy.bean.tts.BatchTtsRequest
TripleTts];nestedexceptioniscom.fasterxml.jackson.databind.exc.InvalidDefinitionException:Cannotconstructinstanceof‘com.alo7.nova.galaxy.bean.tts.BatchTtsRequestTripleTts` (no Creators, like default constructor, exist): cannot deserialize from Object value (no delegate- or property-based Creator)\n at [Source: (PushbackInputStream); line: 13, column: 7] (through reference chain: com.alo7.nova.galaxy.bean.tts.BatchTtsRequest[“triples”]->java.util.ArrayList[0])”,
根据错误信息,这是因为 TripleTts 内部类缺少默认构造函数、委托构造函数或基于属性的构造函数,导致无法进行反序列化。
要解决此问题,我们需要为 TripleTts 类添加一个合适的构造函数或进行其他相应的更改,以使 JSON 库能够正确地解析 BatchTtsRequest 对象。
方法1、添加@AllArgsConstructor
方法2、添加@JsonProperties