使用run-app运行时找不到Grails插件资源

时间:2014-03-24 21:50:18

标签: grails spring-security grails-plugin

我一直在使用没有UI的Spring Security核心插件。现在我必须为它实现接口,所以我自然转向Grails的Spring Security UI插件。

使用grails run-app运行我的项目后,我可以点击该插件的默认控制器,但它似乎找不到spring-security UI附带的资源。我检查了 .grails \ 2.0.4 \ projects \ Proteus \ plugins \ spring-security-ui-1.0-RC1 ,一切似乎都在那里。

通过tomcat打包和部署.WAR文件工作正常。但是, run-war 具有相同的问题。

有没有人知道可能导致这种情况的原因?用这个问题进行开发是非常痛苦的。

谢谢!

我正在使用Grails 2.0.4

Application.resources

app.grails.version=2.0.4
app.name=Proteus
app.servlet.version=2.5
app.version=0.1
plugins.csv=0.3.1
plugins.famfamfam=1.0.1
plugins.mail=1.0.1
plugins.spring-security-core=2.0-RC2
plugins.spring-security-ui=1.0-RC1
点击http://localhost:8080/Proteus/user/

时,

Firebug控制台输出

"NetworkError: 404 Not Found - http://localhost:8080/Proteus/static/plugins/spring-security-ui-1.0-RC1/css/gradient.png"
"NetworkError: 404 Not Found - http://localhost:8080/Proteus/static/plugins/spring-security-ui-1.0-RC1/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png"
"NetworkError: 404 Not Found - http://localhost:8080/Proteus/static/plugins/spring-security-ui-1.0-RC1/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png"
"NetworkError: 404 Not Found - http://localhost:8080/Proteus/static/plugins/spring-security-ui-1.0-RC1/images/safari-checkbox.png"
"NetworkError: 404 Not Found - http://localhost:8080/Proteus/static/plugins/spring-security-ui-1.0-RC1/css/smoothness/images/ui-icons_222222_256x240.png"
"NetworkError: 404 Not Found - http://localhost:8080/Proteus/static/plugins/spring-security-ui-1.0-RC1/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png"

1 个答案:

答案 0 :(得分:1)

原来是config.groovy中的一个设置。几个月前,当我遇到添加字体问题时,我有grails.resources.processing.enabled = false。希望这有助于将来的某个人!

environments {
development {
    grails.logging.jul.usebridge = true
    grails.resources.processing.enabled = false
}
production {
    grails.logging.jul.usebridge = false
    grails.resources.processing.enabled = false
    // TODO: grails.serverURL = "http://www.changeme.com"
}

}