java - Grails, access file from IDE and deployed WAR -
i have grails app, file (foo.bar) located @ {project_root}/src/groovy/resources/foo.bar
i can access file running on local environment when use:
this.getclass().getresource("/src/groovy/resources/foo.bar") but not
this.getclass().getresource("foo.bar") however, when build war using grails war, file copied web-inf/classes/resources/foo.bar, , code access file no longer works.
what's right place set file , refer it, can accessed same way whether it's running in local environment, or deployed in war?
thanks.
java maven grails groovy
No comments:
Post a Comment