类 SpringBootMockServletContext
java.lang.Object
org.springframework.mock.web.MockServletContext
org.springframework.boot.test.mock.web.SpringBootMockServletContext
- 所有已实现的接口:
ServletContext
MockServletContext
implementation for Spring Boot. Respects well-known Spring
Boot resource locations and uses an empty directory for "/" if no locations can be
found.- 从以下版本开始:
- 1.4.0
- 作者:
- Phillip Webb
-
字段概要
从接口继承的字段 jakarta.servlet.ServletContext
ORDERED_LIBS, TEMPDIR
-
构造器概要
构造器构造器说明SpringBootMockServletContext
(String resourceBasePath) SpringBootMockServletContext
(String resourceBasePath, ResourceLoader resourceLoader) -
方法概要
修饰符和类型方法说明getResource
(String path) protected final String
protected String
getResourceLocation
(String path) 从类继承的方法 org.springframework.mock.web.MockServletContext
addFilter, addFilter, addFilter, addFilterRegistration, addInitParameter, addJspFile, addListener, addListener, addListener, addMimeType, 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, getRequestCharacterEncoding, getRequestDispatcher, getResourceAsStream, getResourcePaths, getResponseCharacterEncoding, getServerInfo, getServletContextName, getServletRegistration, getServletRegistrations, getSessionCookieConfig, getSessionTimeout, getVirtualServerName, log, log, registerContext, registerNamedDispatcher, removeAttribute, setAttribute, setContextPath, setDefaultServletName, setEffectiveMajorVersion, setEffectiveMinorVersion, setInitParameter, setMajorVersion, setMinorVersion, setRequestCharacterEncoding, setResponseCharacterEncoding, setServletContextName, setSessionTimeout, setSessionTrackingModes, unregisterNamedDispatcher
-
构造器详细资料
-
SpringBootMockServletContext
-
SpringBootMockServletContext
-
-
方法详细资料
-
getResourceLocation
-
getResourceBasePathLocation
-
getResource
- 指定者:
getResource
在接口中ServletContext
- 覆盖:
getResource
在类中MockServletContext
- 抛出:
MalformedURLException
-