3: Invalid duplicate class definition of class Resource : The source D:\test\grails\projects\productknowlege\grails-app\domain\org\security\Resource.groovy contains at least two definitions of the class Resource.
One of the classes is an explicit generated class using the class statement, the other is a class generated from the script body based on the file name. Solutions are to change the file name or to change the class name.
@ line 3, column 1.
class Resource {
^
1 error
查了半天外国网站,最后才知道是UE保存时,编码设置的问题,重新创建了一下文件就OK了。
One of the classes is an explicit generated class using the class statement, the other is a class generated from the script body based on the file name. Solutions are to change the file name or to change the class name.
@ line 3, column 1.
class Resource {
^
1 error
查了半天外国网站,最后才知道是UE保存时,编码设置的问题,重新创建了一下文件就OK了。
本文探讨了一个在Grails项目中遇到的问题:在文件D: estgrailsprojectsproductknowlegegrails-appdomainorgsecurityResource.groovy中出现了两次类Resource的定义。其中一个通过class语句显式定义,另一个则是基于文件名从脚本主体自动生成的。文章提供了修改文件名或类名的解决方案,并解释了问题的根本原因在于UE的编码设置问题。

被折叠的 条评论
为什么被折叠?



