Grails测试包错误

时间:2013-08-05 09:01:53

标签: grails

运行grails test-app -integration时出现以下错误:

2013-08-05 10:57:34,701 [WARN ] 
(main)grails.app.resourceMappers.org.grails.plugin.resource.BundleResourceMapper - 
Cannot create a bundle from resource [/less/dummy.css], 
the content type [application/octet-stream] is not supported. Set the resource to exclude bundle mapper.

(这是为所有css / js / less ...资源打印的)

这是什么意思。我该如何解决这个问题?


这是我的mime类型设置:

grails.mime.types = [
    all:           '*/*',
    atom:          'application/atom+xml',
    css:           'text/css',
    less:          'text/less',
    csv:           'text/csv',
    form:          'application/x-www-form-urlencoded',
    html:          ['text/html','application/xhtml+xml'],
    js:            'text/javascript',
    coffee:        'text/coffeescript',
    json:          ['application/json', 'text/json'],
    multipartForm: 'multipart/form-data',
    rss:           'application/rss+xml',
    text:          'text/plain',
    xml:           ['text/xml', 'application/xml']
]

// What URL patterns should be processed by the resources plugin
grails.resources.adhoc.patterns = ['/images/*', '/css/*', '/js/*', '/plugins/*']

1 个答案:

答案 0 :(得分:3)

经过一番挖掘后,它似乎是Spring Framework中MockServletContext的一个问题,已在版本3.2.2中解决(JIRA

Grails 2.2.4仍然在Spring Framework 3.1.x上,我不确定Grails 2.3是否已升级到3.2.x版本。

所以基本上这是一个烦人但无害的问题,将在未来的Grails版本中消失。