@Ignored public interface IWebMvc extends IInitialization<IApplication>, IDestroyable
| Modifier and Type | Field and Description |
|---|---|
static String |
MODULE_NAME |
| Modifier and Type | Method and Description |
|---|---|
IWebMvcConfig |
getConfig()
获取WebMVC模块配置对象
|
IApplication |
getOwner()
获取所属应用容器实例
|
void |
processRequest(IRequestContext context,
ServletContext servletContext,
HttpServletRequest request,
HttpServletResponse response)
处理控制器请求
|
boolean |
registerController(Class<?> targetClass)
注册并分析控制器
|
boolean |
registerController(String requestMappingPrefix,
Class<?> targetClass)
注册并分析控制器
|
boolean |
registerInterceptorRule(Class<? extends IInterceptorRule> targetClass)
注册拦截器规则配置
|
initialize, isInitializedclosestatic final String MODULE_NAME
IApplication getOwner()
IWebMvcConfig getConfig()
boolean registerController(String requestMappingPrefix, Class<?> targetClass) throws Exception
requestMappingPrefix - 请求路径映射前缀targetClass - 目标类型Exception - 可能产生的异常boolean registerController(Class<?> targetClass) throws Exception
targetClass - 目标类型Exception - 可能产生的异常boolean registerInterceptorRule(Class<? extends IInterceptorRule> targetClass) throws Exception
targetClass - 目标类型Exception - 可能产生的异常void processRequest(IRequestContext context, ServletContext servletContext, HttpServletRequest request, HttpServletResponse response) throws Exception
context - 请求上下文servletContext - ServletContext对象request - HttpServletRequest对象response - HttpServletResponse对象Exception - 可能产生的异常Copyright © 2022. All rights reserved.