帮助,
我如何在Scala中执行以下操作?
import org.hibernate.validator.constraints.ScriptAssert
@ScriptAssert.List({
@ScriptAssert(script = "...", lang = "javascript"),
@ScriptAssert(script = "...", lang = "javascript")})
答案 0 :(得分:8)
正确的语法如下(数组为Array(...)
,嵌套注释为new Nested(..)
):
import org.hibernate.validator.constraints.ScriptAssert
@ScriptAssert.List(Array(
new ScriptAssert(script = "...", lang = "javascript"),
new ScriptAssert(script = "...", lang = "javascript")))
class Test