Watch 1 Star 0 Fork 0

xiaozhuanhao / MyAnnnoctionMVCJava

Sign up for free
Explore and code with more than 2 million developers,Free private repositories !:)
Sign up
模仿springmvc书写了基于注解的MVC框架 spread retract

Clone or download
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md

#MyAnnnoctionMVC 本项目主要实现注解的mvc框架 该项目的核心在于如何创建handlermaping映射,请求路径和相应的映射 主要步骤 1.初始化时解析application-mvc.xml,包含扫面文件,构建Map<String, AnnotationBean> handlerMapping 信息 2.通过dispatcherServlet拦截用户的请求, 2.1解析用户访问路径从handlerMapping获取处理类的信息 2.2解析用户的查询参数,从handlerMapping获取处理方法的信息 2.3利用反射和HttpServletRequest对象构建处理方法的参数列表 2.4利用反射调用方法并根据方法的返回值跳转到相应界面

http://localhost/MyMVCAnnotation/user.do?get&name=liaiju&pas=123

Comments ( 0 )

You need to Sign in for post a comment

Help Search