org.codehaus.groovy.grails.support
Class DevelopmentResourceLoader
java.lang.Object
org.springframework.core.io.DefaultResourceLoader
org.codehaus.groovy.grails.support.DevelopmentResourceLoader
- All Implemented Interfaces:
- org.springframework.core.io.ResourceLoader
public class DevelopmentResourceLoader
- extends org.springframework.core.io.DefaultResourceLoader
A ResourceLoader that allows files references like /WEB-INF/grails-app to be loaded from ./grails-app to support
the difference between wAR deployment and run-app
- Since:
- 1.0
Created: Jan 30, 2008
- Author:
- Graeme Rocher
Fields inherited from interface org.springframework.core.io.ResourceLoader |
CLASSPATH_URL_PREFIX |
Method Summary |
protected java.lang.String |
getRealLocationInProject(java.lang.String location)
Retrieves the real location of a GSP within a Grails project |
org.springframework.core.io.Resource |
getResource(java.lang.String location)
|
Methods inherited from class org.springframework.core.io.DefaultResourceLoader |
getClassLoader, getResourceByPath, setClassLoader |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DevelopmentResourceLoader
public DevelopmentResourceLoader(GrailsApplication application)
DevelopmentResourceLoader
public DevelopmentResourceLoader(GrailsApplication application,
java.lang.String baseLocation)
getResource
public org.springframework.core.io.Resource getResource(java.lang.String location)
- Specified by:
getResource
in interface org.springframework.core.io.ResourceLoader
- Overrides:
getResource
in class org.springframework.core.io.DefaultResourceLoader
getRealLocationInProject
protected java.lang.String getRealLocationInProject(java.lang.String location)
- Retrieves the real location of a GSP within a Grails project
- Parameters:
location
- The location of the GSP at deployment time
- Returns:
- The location of the GSP at development time
Copyright (c) 2005-2006 The Grails project