gpt4 book ai didi

grails - Groovy “except”语法?

转载 作者:行者123 更新时间:2023-12-02 14:21:59 24 4
gpt4 key购买 nike

我是Groovy的新手。我看到了以下代码here

def beforeInterceptor = [action:this.&auth,except:'login']

如果操作为“login2”,我如何将其扩展为还包括第二个异常?

最佳答案

哇,希望早日得到答案!

好吧,找到我自己的答案:除了,您不能有多个异常(exception)。

在此处查看feature request

相反,他们建议创建一个过滤器。 See here

关于grails - Groovy “except”语法?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/186752/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com