gpt4 book ai didi

grails - IntelliJ的dirtyPropertyNames “cannot resolve symbol”

转载 作者:行者123 更新时间:2023-12-02 13:52:26 29 4
gpt4 key购买 nike

我正在将IntelliJ IDEA用于Grails项目。运行Grails 2.3.5。在域类上使用dirtyPropertyNames时,IntelliJ会警告我“无法解析符号'dirtyPropertyNames'”

这是我的代码:

def getDirtyProperties(User user) {
def dirtyProperties = user.dirtyPropertyNames
return dirtyProperties
}

我这是什么问题谢谢。

最佳答案

您需要一个更智能的IDE :)该方法在那里,您知道该方法,因为代码可以运行。它已添加到MetaClass,因此无法通过反射看到。 IDE必须对动态方法进行特殊处理,显然这是漏掉的。

关于grails - IntelliJ的dirtyPropertyNames “cannot resolve symbol”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22155459/

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