Java菜鳥學習日記27

Spring靜態資源處理 一般會配置SpeingMVC攔截全部請求,即將DisptcherServlet的url-pattern設置爲/ ,此時會致使SpringMVC同時攔截 .css .jpg .js 等靜態資源,而咱們並不會爲這些靜態資源添加相應的@RequestMapping,所以致使靜態資源404 解決方法 讓SpringMVC攔截範圍縮小,即設置url-pattern爲 *.do 或
相關文章
相關標籤/搜索