我在'src'目錄下創建了一個類。我使用這個代碼來訪問「的grails-app」裏面所有文件的「圖片」目錄:在Grails中從'src'解析'web-app/file/misc'的路徑
ApplicationHolder.application.parentContext.getResource("file/misc").file;
我有,當我訪問它的「SRC」類此錯誤:
application has private access in org.codehaus.groovy.grails.commons.ApplicationHolder
對此問題的評論爲何這樣?如何在應用程序部署到tomcat時訪問「file/misc」?