小编Kra*_*auw的帖子

静态不会返回Grails 1.4中的任何css或js资源

我刚刚创建了我的第一个Grails 1.4应用程序,并且在新的资源管理方面遇到了一些问题:"静态处理程序"没有返回任何css或js文件,而是说:

ERROR resource.ResourceMeta  - Resource not found: /static/plugins/jquery-ui-1.8.15/jquery-ui/themes/ui-lightness/jquery-ui-1.8.15.custom.css
ERROR resource.ResourceMeta  - Resource not found: /static/plugins/jquery-1.6.1.1/js/jquery/jquery-1.6.1.min.js
ERROR resource.ResourceMeta  - Resource not found: /static/plugins/blueprint-1.0.2/css/blueprint/screen.css
ERROR resource.ResourceMeta  - Resource not found: /static/plugins/jquery-ui-1.8.15/jquery-ui/js/jquery-ui-1.8.15.custom.min.js
ERROR resource.ResourceMeta  - Resource not found: /static/css/main.css
ERROR resource.ResourceMeta  - Resource not found: /static/js/application.js
Run Code Online (Sandbox Code Playgroud)

图像工作正常!

正如你在下面的文件中看到的那样,我真的已经废弃了所有内容 - 所以我想我可能会遗漏某些常规设置?

布局文件(main.gsp):

<html>
   <head>
      <g:layoutTitle/>
      <r:layoutResources/>

   </head>
   <body>
      <g:layoutBody/>
      <r:layoutResources/>
   </body>
</html>
Run Code Online (Sandbox Code Playgroud)

页面(index.gsp):

<html>
   <head>
      <meta name="layout" content="main"/>
      <r:require modules="jquery-ui, blueprint"/>
      <r:require module="core"/> 
    </head> 
    <body> 
    <div id="form"> 
        <r:img uri="/images/grails_logo.png" width="100" height="50"/>
        Hello World …
Run Code Online (Sandbox Code Playgroud)

grails resources static

5
推荐指数
1
解决办法
2692
查看次数

标签 统计

grails ×1

resources ×1

static ×1