org.springframework.context.support
Class ResourceEntityResolver
java.lang.Object
org.springframework.beans.factory.xml.BeansDtdResolver
org.springframework.context.support.ResourceEntityResolver
- All Implemented Interfaces:
- org.xml.sax.EntityResolver
- public class ResourceEntityResolver
- extends BeansDtdResolver
EntityResolver implementation that tries to resolve entity references
relative to the resource base of the application context, if applicable.
Extends BeansDtdResolver to also provide DTD lookup in the classpath.
Allows to use standard XML entities to include XML snippets into an
application context definition, for example to split a large XML file
into various modules. The include paths can be relative to the
application context's resource base as usual, instead of relative
to the JVM working directory (the XML parser's default).
Note: In addition to relative paths, every URL that specifies a
file in the current system root, i.e. the JVM working directory,
will be interpreted relative to the application context too.
- Since:
- 31.07.2003
- Author:
- Juergen Hoeller
- See Also:
ResourceLoader.getResource(java.lang.String)
Method Summary |
org.xml.sax.InputSource |
resolveEntity(java.lang.String publicId,
java.lang.String systemId)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ResourceEntityResolver
public ResourceEntityResolver(ApplicationContext applicationContext)
resolveEntity
public org.xml.sax.InputSource resolveEntity(java.lang.String publicId,
java.lang.String systemId)
throws java.io.IOException
- Specified by:
resolveEntity
in interface org.xml.sax.EntityResolver
- Overrides:
resolveEntity
in class BeansDtdResolver
- Throws:
java.io.IOException
Copyright (C) 2003-2004 The Spring Framework Project.