grails lesscss-resources插件问题

DaH*_*ter 1 grails plugins less

我在插件时遇到问题.一切似乎都很好,但在dev env中运行应用程序后,页面加载但抱怨它无法找到已编译的css文件.我使用的是Grails 2.0.1和lesscss-resources 1.3.0.

以下是我在UiResources.groovy中的内容:

styling {
    defaultBundle 'styling'

    resources url: '/less/mainStyles.less', attrs:[rel: "stylesheet/less", type: 'css'], disposition: 'head', bundle: 'bundle_styling'
    resources url: '/css/other.css', disposition: 'head'
}
Run Code Online (Sandbox Code Playgroud)

页面上显示的是:

< link href="/appName/bundle-bundle_styling_head.css" type="text/css" media="screen, projection" rel="stylesheet" >
Run Code Online (Sandbox Code Playgroud)

虽然我可以找到这个文件

~/.grails/2.0.1/projects/appName/tomcat/worl/Tomcat/localhost/appName/grails-resources ...
Run Code Online (Sandbox Code Playgroud)

Grails控制台也抱怨:

Resources not found: /bundle-bundle_styling_head.css
Run Code Online (Sandbox Code Playgroud)

我一直在尝试不同的工作,直到无效.我这里做错了吗?

JWa*_*ner 5

我有类似的问题,发现删除捆绑选项修复了问题.所以删除",bundle:'bundle_styling'"来制作这行:

资源网址:'/ without/mainStyles.less',attrs:[rel:"stylesheet/less",类型:'css'],处理:'head'

希望这也适合你.