1、掃盲常識
在spring3.1之前使用org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping註解映射器。
在spring3.1之後使用org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping註解映射器。
在spring3.1之前使用org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter註解適配器。
在spring3.1之後使用org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter註解適配器。
2、註解的處理器映射器和適配器
使用註解的映射器和註解的適配器。(註解的映射器和註解的適配器必須配對使用)
2.1、配置註解映射器(spring3.1前後有改動)
2.2、配置註解適配器(spring3.1前後有改動)
3、開發註解Handler
在視圖解析器配置視圖頁面的前綴和後綴
4、訪問測試(項目名要對,查看@RequestMapping("/queryItems8"))