【问题标题】:Unable to resolve Class for burningimage plugin in grails app无法在 grails 应用程序中解析用于刻录图像插件的类
【发布时间】:2012-07-18 01:14:04
【问题描述】:

我在 Mac 上运行 grails 2.0.4,并安装了 burnimage 插件来处理图像上传。

我的域对象中有这个:

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

但是,netbeans 说它无法解析该类,当我在控制器中调用 imageUploadService 时,我收到此错误

No such property: imageUploadService for class: wine.WineController

Netbeans 认为插件已安装,我可以在 .grails 文件夹中看到项目下的插件源文件。知道如何解决导入问题吗?

【问题讨论】:

    标签: grails plugins


    【解决方案1】:

    grails clean 并重新编译可能有助于它查看类。但是我在 Netbeans 中遇到了这些类型的导入“错误”,但一切都编译并运行良好。

    尝试在控制器中注入服务:

    class WineController {
       def imageUploadService
       ...
    }
    

    【讨论】:

    • 谢谢,我相信添加 def imageUploadService 可以解决问题。
    猜你喜欢
    • 1970-01-01
    • 2013-12-30
    • 2018-10-21
    • 2012-02-17
    • 1970-01-01
    • 2011-04-09
    • 2011-05-06
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多