救命,
我如何在Scala中执行以下操作?
import org.hibernate.validator.constraints.ScriptAssert
@ScriptAssert.List({
@ScriptAssert(script = "...", lang = "javascript"),
@ScriptAssert(script = "...", lang = "javascript")})
最佳答案
正确的语法如下(对于数组,Array(...)
,对于嵌套注释,new Nested(..)
):
import org.hibernate.validator.constraints.ScriptAssert
@ScriptAssert.List(Array(
new ScriptAssert(script = "...", lang = "javascript"),
new ScriptAssert(script = "...", lang = "javascript")))
class Test