摘要:
手写SpringMVC思路 1.web.xml加载 为了读取web.xml中的配置,我们用到ServletConfig这个类,它代表当前Servlet在web.xml中的配置信息。通过web.xml中加载我们自己写的MyDispatcherServlet和读取配置文件。 2、初始化阶段 在前面我们提 阅读全文
摘要:
这么说其实不规范 spring的bean 默认是单例 springmvc的controller 默认是单例 所以最好不要在controller里定义成员变量 都可通过注解 @scope=prototype 来改变 阅读全文