3

请给一些建议...

缓存资源现在无法正常工作,几天后才开始工作。相同的代码相同的插件,我发现与以前相比有一个尊重(虽然它工作正常),同时关闭 tomcat 服务器。它不会自行关闭,并在控制台中提供一些信息,如下所示:

INFO: SessionListener: contextDestroyed()
Apr 16, 2013 6:41:19 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextDestroyed()
Apr 16, 2013 6:41:19 AM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["http-apr-8080"]
Apr 16, 2013 6:41:19 AM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["ajp-apr-8009"]
Apr 16, 2013 6:41:19 AM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["http-apr-8080"]
Apr 16, 2013 6:41:19 AM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["ajp-apr-8009"]

使用:

Grails 2.1.4
Groovy 2.0.4
Java 1.7
Tomcat 7.0.37
Windows 7

=========================

在 Config.xml 我添加了这段代码

grails.resources.debug = true
 grails.resources.modules = {
     'core' {
         defaultBundle 'core-ui'
         resource url: '/css/Company_base.css', attrs: [ media: 'screen' ]
         resource url: '/css/cl.min.css', attrs: [ media: 'screen' ]
         resource url: '/css/errors.css', attrs: [ media: 'screen' ]
         resource url: '/css/jquery.multiselect.css', attrs: [ media: 'screen' ]
         resource url: '/css/main.css', attrs: [ media: 'screen' ]
         resource url: '/css/masterbrand.min.css', attrs: [ media: 'screen' ]
         resource url: '/css/mcd.min.css', attrs: [ media: 'screen' ]
         resource url: '/css/mobile.css', attrs: [ media: 'screen' ]
         resource url: '/css/myapp.css', attrs: [ media: 'screen' ]
         resource url: '/css/style.css', attrs: [ media: 'screen' ]
         resource url: '/css/table.css', attrs: [ media: 'screen' ]
         wrapper: { s -> "<!--[if lt IE 8]>$s<![endif]-->"

         }
     }
     'ui' {
         defaultBundle 'core-ui'
         resource url: '/js/myapp.js', disposition: 'head'
     }
 }

在 BuildConfig.xml 中,我添加了这段代码

runtime ":cache:1.0.1"
runtime ":cache-headers:1.1.5"
runtime ":cached-resources:1.0"
4

0 回答 0