**
思路圖
**
步驟:
1.首先瀏覽器上訪問路徑/admin_category_list。
2.tomcat根據web.xml中的配置信息,攔截到了/admin_category_list,並將其由前端控制器DispatcherServlet處理。
3.DispatcherServle根據SpringMVC的配置,將這次請求交由控制器類CategoryController進行處理,所以需要進行這個類的實例化。
4.在實例化CategoryController的時候,注入CategoryServiceImpl。
5.在實例化CategoryServiceImpl時,又注入CategoryMapper。
6.根據ApplicationContext.xml中的配置信息,將CategoryMapper和CategoryMapper.xml關聯起來了。
7.這樣就拿到了CategoryController的實例化類,並調用list()方法。
8.在list方法中,訪問CategoryService,並獲取數據,將數據放到“cs”上,服務器跳轉到listCategory.jsp頁面中去。
9.最後在listCategory.jsp中利用EL和jstl表達式將數據顯示出來。