public class SpringBootMockServletContext extends MockServletContext
MockServletContext
implementation for Spring Boot. Respects well know Spring
Boot resource locations and uses an empty directory for "/" if no locations can be
found.ORDERED_LIBS, TEMPDIR
Constructor and Description |
---|
SpringBootMockServletContext(String resourceBasePath) |
SpringBootMockServletContext(String resourceBasePath,
ResourceLoader resourceLoader) |
Modifier and Type | Method and Description |
---|---|
URL |
getResource(String path) |
protected String |
getResourceBasePathLocation(String path) |
protected String |
getResourceLocation(String path) |
addFilter, addFilter, addFilter, addInitParameter, addListener, addListener, addListener, addServlet, addServlet, addServlet, createFilter, createListener, createServlet, declareRoles, getAttribute, getAttributeNames, getClassLoader, getContext, getContextPath, getDeclaredRoles, getDefaultServletName, getDefaultSessionTrackingModes, getEffectiveMajorVersion, getEffectiveMinorVersion, getEffectiveSessionTrackingModes, getFilterRegistration, getFilterRegistrations, getInitParameter, getInitParameterNames, getJspConfigDescriptor, getMajorVersion, getMimeType, getMinorVersion, getNamedDispatcher, getRealPath, getRequestDispatcher, getResourceAsStream, getResourcePaths, getServerInfo, getServlet, getServletContextName, getServletNames, getServletRegistration, getServletRegistrations, getServlets, getSessionCookieConfig, log, log, log, registerContext, registerNamedDispatcher, removeAttribute, setAttribute, setContextPath, setDefaultServletName, setEffectiveMajorVersion, setEffectiveMinorVersion, setInitParameter, setMajorVersion, setMinorVersion, setServletContextName, setSessionTrackingModes, unregisterNamedDispatcher
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getVirtualServerName
public SpringBootMockServletContext(String resourceBasePath)
public SpringBootMockServletContext(String resourceBasePath, ResourceLoader resourceLoader)
protected String getResourceLocation(String path)
getResourceLocation
in class MockServletContext
public URL getResource(String path) throws MalformedURLException
getResource
in interface ServletContext
getResource
in class MockServletContext
MalformedURLException
Copyright © 2016 Pivotal Software, Inc.. All rights reserved.