一 、引言
好久沒寫了,沒事兒看看了手寫springmvc的文章,有些感慨,自己太弱了,順便梳理了下spring與web的關係。
手寫springmvc基本思路
1、讀取配置文件;
2、找到配置文件的類;
3、newinstance生成ioc的hashmap;
4、注入屬性,從hashmap中獲取;
5、掃描controller類,生成url與method對應關係,生成hashmap,用於反射調用;
二、
一 、引言
好久沒寫了,沒事兒看看了手寫springmvc的文章,有些感慨,自己太弱了,順便梳理了下spring與web的關係。
手寫springmvc基本思路
1、讀取配置文件;
2、找到配置文件的類;
3、newinstance生成ioc的hashmap;
4、注入屬性,從hashmap中獲取;
5、掃描controller類,生成url與method對應關係,生成hashmap,用於反射調用;
二、