简体   繁体   English

无法在Grails应用程序中为BurningImage插件解析类

[英]Unable to resolve Class for burningimage plugin in grails app

I'm running grails 2.0.4 on a mac, and installed the burningimage plugin to handle image uploads. 我在Mac上运行grails 2.0.4,并安装了burningimage插件来处理图像上传。

I have this at in my domain object: 我的域对象中有这个:

import pl.burningice.plugins.image.ast.FileImageContainer 

however, netbeans says it's unable to resolve the class, and when I call imageUploadService in my controller, I get this error 但是,netbeans说它无法解析该类,当我在控制器中调用imageUploadService时,出现此错误

No such property: imageUploadService for class: wine.WineController

Netbeans believes the plugin is installed, and I can see the plugin source files under the project in the .grails folder. Netbeans相信插件已安装,我可以在.grails文件夹中的项目下看到插件源文件。 Any idea how to resolve the import? 任何想法如何解决导入?

A grails clean and recompile might help it see the class. grails clean和重新编译grails clean可能有助于使其了解类。 However I get these type of import 'errors' in Netbeans but everything compiles and runs fine. 但是我在Netbeans中遇到了这种类型的导入“错误”,但是所有内容都能编译并运行良好。

Try injecting the service in your controller: 尝试将服务注入控制器中:

class WineController {
   def imageUploadService
   ...
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM