2014-03-24 58 views
0

我一直在使用沒有UI的Spring Security核心插件。現在我必須實現這個接口,所以我自然轉向了Grails的Spring Security UI插件。使用run-app運行時未找到Grails插件資源

使用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 

Firebug的控制檯輸出,當我打http://localhost:8080/Proteus/user/

"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

可謂是在配置設置。常規。幾個月前我有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" 
} 

}