我正在尝试在我的currrent项目中实现bootstrap文件上传插件,并且我得到以下错误。而所有.js和.css文件都出现在web-app中,但之后也是这个错误即将来临..
注 - grails版本2.4.0
错误消息
Error |
2014-07-14 18:34:15,132 [localhost-startStop-1] ERROR resource.ResourceMeta -Resource not found: /assets/bootstrap-image-gallery.css
Error |
2014-07-14 18:34:15,212 [localhost-startStop-1] ERROR resource.ResourceMeta -Resource not found: /assets/bootstrap-image-gallery.js
Error |
2014-07-14 18:34:15,366 [localhost-startStop-1] ERROR resource.ResourceMeta -Resource not found: /assets/tmpl.js
Error |
2014-07-14 18:34:15,441 [localhost-startStop-1] ERROR resource.ResourceMeta -Resource not found: /assets/load-image.js
Error |
2014-07-14 18:34:15,528 [localhost-startStop-1] ERROR resource.ResourceMeta -Resource not found: /assets/canvas-to-blob.js
Error |
2014-07-14 18:34:15,568 [localhost-startStop-1] ERROR resource.ResourceMeta -Resource not found: /assets/jquery.fileupload-ui.css
Error |
2014-07-14 18:34:15,609 [localhost-startStop-1] ERROR resource.ResourceMeta -Resource not found: /assets/jquery.iframe-transport.js
Error |
2014-07-14 18:34:15,649 [localhost-startStop-1] ERROR resource.ResourceMeta -Resource not found: /assets/jquery.fileupload.js
Error |
2014-07-14 18:34:15,689 [localhost-startStop-1] ERROR resource.ResourceMeta -Resource not found: /assets/jquery.fileupload-ip.js
Error |
2014-07-14 18:34:15,796 [localhost-startStop-1] ERROR resource.ResourceMeta -Resource not found: /assets/jquery.fileupload-ui.js
答案 0 :(得分:0)
由于您正在使用资产管道插件,因此我假设您正在使用<asset:javascript />
标记来呈现脚本。在这种情况下,您需要将JavaScript放在assets
的{{1}}文件夹中。
或者您可以更改配置,以便从&#34; /&#34;中获取资源。 grails-app
中的上下文。
查看资产管道的文档,了解更多选项。